Media Queries?
- Started
- Last post
- 25 Responses
- bainbridge0
Bump, what sizes are standard now?
- ETM1
There is no 'standard'. Common, however, for max-width breaks:
320, 480, 767, 979, 1200, 1400
Me, I generally use max-widths of:
480, 767, 979, 1220
Those are generally enough when using percentages and/or ems for any widths.
- bainbridge0
What size is the largest mobile size?
- Define mobile? A large phone? A small tablet? Maybe 640px, but there are so many device variants.ETM
- That's why percentages and ems.ETM
- Thanksbainbridge
- Figuring out type sizes for appearing on phones.bainbridge
- In ems I hope... ;)ETM
- bainbridge0
Is it possible to make a @media query apply to everything but one <div>?
- mekk0
^ safe way is to copy the settings of said div to all your breakpoints.
Risky way is to set it like this:
/* 1200px+ */
div {foo: bar;}/* 900px+ */
div {foo: bar;}/* 500px+ !Important */
.container > div.class {foo: bar;}
...The trick is: the more specific the path in your css, the more important it is in the hierarchy. for example:
div {color: red;}
div {color: green;}div would be green, right? because always the bottom one overwrites the top one. Now take this:
body > div {color: red;}
div {color: green;}div's would still have red text, because it has the more specific path in css, thus is rated more important.
- if you're using less you can define it once and call it in all breakpoints with this methodmekk