I originally had
@media only screen {max-width: 800px), but realized that "only screen" was irrelevant for me. The only mediatype options are all, screen, print, or speech, with "all" being the default if nothing is specified. Since I have no interest in anyone printing my pages and have never created CSS for speech readers, I might as well let it default to all.
Why do you need a min-width at all for devices that are certainly going to be a good deal wider than 760px anyway?
Here me out here, because you might suggest something better!
I originally had something like this (from memory):
html, body { height: 100% }
.container { width: 975px }
@media (max-width: 800px) {
.container { width: 760px !important }
}
But I was trying to skip the overwrite by just setting a minimum and maximum width.
I'm trying to accommodate old code with tables and fixed-widths, and if their width is 360px then I still need for the container to be 760px. So that min-width is really for mobile devices, and (in theory) would have no impact on larger devices.
fwiw, I've had unpredictable results combinging {width} and {max-width} in the same statement.
Hmm. I thought it possible that
width: 100% would be irrelevant anyway, so I just not removed it for testing and it messed up a bunch of my floating elements :-/ So far it seems OK, but I've only tested on the current versions of Chrome, Firefox, and my Android. Any suggestions on what unpredictability I should be on the lookout for?
* err, for which I should be on the lookout?
"Sorry. Sorry everybody!" - Neil Goldman