2
votes

@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...

2
Please go through the link. stackoverflow.com/questions/16348489/…LIJIN SAMUEL

2 Answers

2
votes

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

0
votes

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.