0

I want to add media query to specific device ipad pro of size 1366*1024 height width and height.How do i add media query to to that size targeting only that width and height.Not less than 1366 or greater than 1366 !!!

akash stack
  • 3
  • 1
  • 3

3 Answers3

2

Copy pasted from here

@media (min-height: 1024px) and (min-width: 1366px) {
    /* CSS stuff */
}

Don't forget <meta name="viewport" content="width=device-width, initial-scale=1.0"> meta tag on header too.

Kaung Myat Lwin
  • 1,049
  • 1
  • 9
  • 23
  • `@media (min-height: 1024px) and (min-width: 1366px) and (max-height: 1024px) { /* CSS stuff */ }` Taken from - https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Logical_operators Use the logical operators to your craft. – Kaung Myat Lwin Jun 19 '17 at 07:31
0
@media only screen 
and (min-device-width : 1024px) 
and (max-device-width : 1366px) { /* STYLES GO HERE */}

Reference link

Dhaval Panchal
  • 648
  • 6
  • 26
0
    @media only screen 
      and (min-device-width: 1024px) 
      and (max-device-width: 1366px) 
      and (-webkit-min-device-pixel-ratio: 1.5) {
  //code
    }

You can also specify if you want to set over portrait or landscape:

    /* Portrait */
    @media only screen 
      and (min-device-width: 1024px) 
      and (max-device-width: 1366px) 
      and (orientation: portrait) 
      and (-webkit-min-device-pixel-ratio: 1.5) {
  //code
    }

/* Landscape */
@media only screen 
  and (min-device-width: 1024px) 
  and (max-device-width: 1366px) 
  and (orientation: landscape) 
  and (-webkit-min-device-pixel-ratio: 1.5) {
//code
}
Lib3r74
  • 1
  • 4