Reputation: 598
@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...
Upvotes: 2
Views: 12644
Reputation: 3320
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) { /* STYLES GO HERE */}
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) { /* STYLES GO HERE */}
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) { /* STYLES GO HERE */ }
/* 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
Upvotes: 3
Reputation: 1137
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.
Upvotes: 0