Alexander
Alexander

Reputation: 11

Combining specific media queries in CSS

I'm looking to apply styles to a very specific set of width/height combinations.

Currently I have two combos separated as so, but I have a number of other combinations to add too:

@media  only screen
    and (width: 468px)
    and (height : 60px) {

    .header {
        height:100%;   
    }
}

@media  only screen 
    and (width: 728px)
    and (height : 90px) {

    .header {
        height:100%;   
}

I've tried unsuccessfully to combine these into one media query. Is it possible?

Many thanks.

Upvotes: 1

Views: 184

Answers (1)

antyrat
antyrat

Reputation: 27765

You can try this:

@media 
   only screen and (width: 468px) and (height : 60px), 
   only screen and (width: 728px) and (height : 90px) {

    .header {
      height:100%;   
    }
}

Upvotes: 1

Related Questions