Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Media Queries: Screen > 1024

I'm trying to apply media queries in a site but my knownledge is not deep in this topic, so basically I want to apply a specific style to a tag when the detected screen is greater than 1024*768.

I did this

@media screen and ( device-width: 1024px ) {

}

but the I've to identify when the resolution is greater than 1024

like image 542
m4g4bu Avatar asked Aug 15 '12 19:08

m4g4bu


People also ask

What are the screen sizes for media queries?

In my experience, 320px, 768px, and 1200px are the most commonly used; these three values should be sufficient for targeting smart phones, tablets/laptops, and desktops, respectively.

What is screen in media query?

Media query is used to create responsive web design. It means that the view of web page differ from system to system based on screen or media types. screen: It is used to set the screen size of media query. The screen size can be set by using max-width and min-width.

What is @media screen and max width 600px?

Max-width and min-width can be used together to target a specific range of screen sizes. @media only screen and (max-width: 600px) and (min-width: 400px) {...} The query above will trigger only for screens that are 600-400px wide. This can be used to target specific devices with known widths.


1 Answers

Try this:

@media only screen and (min-width : 1025px) {
    .classname {
        /* styles here */
    }
}


@media only screen and (max-width : 1024px) {
    .classname {
        /* other styles here */
    }
}
like image 104
Mike Brant Avatar answered Sep 29 '22 16:09

Mike Brant