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

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -