2

@media only screen and (min-width: 768px) and (max-width:1199px) {}

I want to put Media query only for safari browser for given Size of device.

@media screen and (-webkit-min-device-pixel-ratio:0) and (min-width: 768px) and (max-width:1199px) { ::i-block-chrome,.allsearch-in select{display:none;} }

still not Working...

Dhruvang Gajjar
  • 568
  • 1
  • 8
  • 20
  • Please go through the link. http://stackoverflow.com/questions/16348489/is-there-a-css-hack-for-safari-only-not-chrome – LIJIN SAMUEL Mar 20 '17 at 11:35

2 Answers2

3

CSS Media Queries for iPads & iPhones

iPad in portrait & landscape

@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1024px)  { /* STYLES GO HERE */}

iPad in landscape

@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1024px) 
and (orientation : landscape) { /* STYLES GO HERE */}

iPad in portrait

@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1024px) 
and (orientation : portrait) { /* STYLES GO HERE */ }

Browser Specific Hacks

/* saf3+, chrome1+ */
@media screen and (-webkit-min-device-pixel-ratio:0) {
#diez  { color: red  }
}

 /* iPhone / mobile webkit */
 @media screen and (max-device-width: 480px) {
  #veintiseis { color: red  }
 }

ThankYou

Momin
  • 3,200
  • 3
  • 30
  • 48
0

Add Class for safari browser to determine browser name by javascript

var ua = navigator.userAgent.toLowerCase(); 
if (ua.indexOf('safari') != -1) { 
  if (ua.indexOf('chrome') == -1) {
    alert("2"); // Safari
    //add class to body tag
  }
}

then use this class in css.

Mohamed Abo Elmagd
  • 1,077
  • 11
  • 17