Guest User

Untitled

a guest
Jun 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <div>
  2. As you resize the screen this snaps from 80% to 100%.
  3. I'd like to achieve a smooth transition between the two
  4. instead, so that if you set it to 800px wide you'll end
  5. up with a div that's 90% of that, i.e. 720px.
  6. </div>
  7.  
  8. div {
  9. background: #def;
  10. height: 100px;
  11. margin: 0 auto;
  12. }
  13.  
  14. @media screen and (min-width: 1000px) {
  15. div {
  16. width: 80%
  17. }
  18. }
  19.  
  20. @media screen and (min-width: 601px) and (max-width: 999px) {
  21. div {
  22. /* what goes in here? */
  23. }
  24. }
  25.  
  26. @media screen and (max-width: 600px) {
  27. div {
  28. width: 100%
  29. }
  30. }
Add Comment
Please, Sign In to add comment