html - CSS one column layout of relative width -
i'd need website layout behave this:
if content div wider 50em, apply rules width: 75%; max-width: 75em
. otherwise, max-width: 50em; min-width: 25em
apply.
primary reason setup wide screen panels vs. laptops , mobiles. content horizontally centered. if div 75% wide, kill layout on phones, , make long, unreadable lines on wide screens.
use @media queries. made things this.
@media screen , (min-width: 50em) { #div { width: 75%; max-width: 75em; } }
more info http://css-tricks.com/css-media-queries/
Comments
Post a Comment