I am redesigning my blog with responsive web design and the mobile first approach. In short, I'm trying to use a minimum width to avoid any kind of replication or css. no display: none etc ...
My problem is that when I need to rewrite the CSS value, the lower minimum width takes precedence. Example:
@media only screen and (min-width: 600px) { h2 { font-size: 2.2em; } } @media only screen and (min-width: 320px) { h2 { font: normal 1.7em/2.1em Helvetica, sans-serif; } }
I would expect it to be at 600 pixels or higher to get 2.2em h2, but instead I get 1.7em. In my Dev tools, I see that there is a 2.2em declaration, but another has an advantage. It does not make sense!
Can I use min-width and effectively overwrite higher resolution ads without using stronger selectors or max-width.?
css css3 media-queries css-specificity
George Katsanos Apr 24 '12 at 22:01 2012-04-24 22:01
source share