I'm having an issue with a CSS media query where the general style is being applied after the media query despite being above the media query in the cascade.
Example:
HTML:
<div id="myblock1">
<div>Block 1</div>
<div id="myblock2">Block 2</div>
<div>Block 3</div>
</div>
CSS:
#myblock1 div {
display:block;
background-color:#F00;
}
@media (min-width:600px) {
#myblock2 {
display:none;
}
}
Live demo: jsFiddle
In theory, all 3 blocks should be visible in windows of 600px width or less, and when larger the middle block should disappear, but that is not the case. Any ideas on why the ID/media query is being applied before the general styling?