Media Queries?
Media Queries?
Out of context: Reply #25
- Started
- Last post
- 25 Responses
- 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