Reputation: 1630
I cannot address child elements via CSS mediaqueries. How can I style the list elements in the example below for a screen width that is bigger than 800px?
HTML
<ul class="navigation">
<li></li>
<li></li>
<li></li>
</ul>
CSS
.navigation > li{ display: block; width: 10em; };
@media screen and (min-width: 800px) {
.navigation > li{ width: 20em; };
}
Upvotes: 0
Views: 559
Reputation: 16140
You should get rid of semicolons after braces. Chrome doesn't like them:
.navigation > li{
display: block;
width: 10em;
background: red;
margin: 10px;
}
@media screen and (min-width: 300px) {
.navigation > li{
width: 20em;
}
}
Fiddle: http://jsfiddle.net/wQu9j/2/
Upvotes: 1
Reputation: 1605
hope it will help you, add media queries after the regular css code,
@media only screen and (mix-width: 800px) {
//add your css it may help you
}
Upvotes: 1