Media Queries
-
I'm having trouble getting my media queries to work. No matter what media query I write in the CSS file, it just seems to be ignored. An example is as follows:
@media only screen and (min-width: 320){
header nav ul li{
display:block;
}
}I've got lots of other CSS code in the file but not in media queries. Does everything need to be in a media query?
-
I'm having trouble getting my media queries to work. No matter what media query I write in the CSS file, it just seems to be ignored. An example is as follows:
@media only screen and (min-width: 320){
header nav ul li{
display:block;
}
}I've got lots of other CSS code in the file but not in media queries. Does everything need to be in a media query?
Shouldn't your min-width value have a px appended?
min-width: 320px
-
Shouldn't your min-width value have a px appended?
min-width: 320px
Thank you. That solved it. Another problem that I'm finding is that I can't get my menu items centered in the middle of the
header nav
and be consistently centered for popular device types. It looks fine of the iPad, but on a Macbook Pro Retina it's more left justified. My base code centers it up nicely on an older LCD DELL 1024 x 768 monitor but the base code has no effect on the Retina. I've coded media queries for iPad min and iPad portrait and landscape and it's all good. Can't figure out what I'm doing wrong.