2

I am adding styles for iPhoneX but its even getting reflected for iPhone 6,7,8 plus devices too.

Media queries am writing

@media only screen and (min-device-width : 375px) and (max-device-width : 812px) and (-webkit-device-pixel-ratio : 3)and (orientation : portrait){
      margin-top: 5%;
}

even tried adding iPhone6,7,8 plus devices specific media query and giving margin-top: 0%

but that also didn't work. Any answers would be a great help.

Quentin Hayot
  • 7,786
  • 6
  • 45
  • 62
Lucky
  • 51
  • 1
  • 4

1 Answers1

0

IPhoneX

@media only screen 
and (min-device-width : 375px) 
and (max-device-width : 812px)
and (-webkit-device-pixel-ratio : 3) { /* STYLES GO HERE */}

IPhone 6,7,8

@media only screen 
and (min-device-width : 375px) 
and (max-device-width : 667px) { /* STYLES GO HERE */}
Suresh Kumar Ariya
  • 9,516
  • 1
  • 18
  • 27