Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to use media queries in css

How to use media queries in css

Problem

I am very keen to use media queries in my CSS but i am confused to how to use it. I have stand

my queries requirement is

if Screen Width is 100 to 480 then different style comes,

if screen width 481 to 600 then different style comes,

if screen width 601 to 800 then different style comes,

if screen width 801 then default CSS should work.

Problem courtesy of: Carlos

Solution

.class { /* default style */ }

@media (min-width: 100px) and (max-width: 480px) {
 .class { /* style */ }
}

@media (min-width: 481px) and (max-width: 600px) {
 .class { /* style */ }
}

@media (min-width: 601px) and (max-width: 800px) {
 .class { /* style */ }
}
Solution courtesy of: housefrommars

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

How to use media queries in css

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×