I'm making a website where I want to use 4 layouts. These are as follows:
1. @media screen and (min-width: 1196px) {
}
(If the screen is over 1196px, use this layout.)
2. @media screen and (max-width:1195px){ {
}
(If the screen is under 1195 px, use this layout.)
3. @media screen and (min-width: 480px) and (max-width:1194px){
{
(If the screen is over 480px and under 1194 px, use this layout.)
4. @media screen and (max-width:480px) {
}
(If the screen is under 480px, use this layout)
My problem is that numbers 1, 2 and 4 are working fine, but the third media query is being ignored for #2. If I specify #2 should be between certain widths then that layout breaks and the browser treats it as if it doesn't exist.
Question
Muessig
I'm making a website where I want to use 4 layouts. These are as follows:
1. @media screen and (min-width: 1196px) {
}
(If the screen is over 1196px, use this layout.)
2. @media screen and (max-width:1195px){ {
}
(If the screen is under 1195 px, use this layout.)
3. @media screen and (min-width: 480px) and (max-width:1194px){
{
(If the screen is over 480px and under 1194 px, use this layout.)
4. @media screen and (max-width:480px) {
}
(If the screen is under 480px, use this layout)
My problem is that numbers 1, 2 and 4 are working fine, but the third media query is being ignored for #2. If I specify #2 should be between certain widths then that layout breaks and the browser treats it as if it doesn't exist.
Any help?
Link to comment
Share on other sites
8 answers to this question
Recommended Posts