Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apply CSS only for Safari?

Tags:

css

safari

Is it possible to add a block of css that I only want to be displayed in Safari and no other browsers?

like image 448
Zach Smith Avatar asked Oct 29 '10 16:10

Zach Smith


People also ask

How do I get CSS to work in Safari?

Displaying properties in Safari There is a CSS appearance property used to display an element using a platform-native styling based on the users' operating system's theme. To make it work on Safari, we must set the appearance property to its "none" value. Also, use -WebKit- and -Moz- vendor prefixes.

Does Safari use CSS?

CSS all property is Fully Supported on Safari 15, which means that any user who'd be accessing your page through Safari 15 can see it perfectly. Browser incompatibility may be due to any other web technology apart from CSS all property.

What CSS does Safari not support?

The visibility:collapse CSS property is not supported by Safari for table columns, and not supported on older browsers.


1 Answers

Here's an example which would set the font colour of your site to green if your browser is Safari or Chrome (both share the common Webkit rendering engine).

@media screen and (-webkit-min-device-pixel-ratio:0) {
    body {
        color:green; /* on Safari and Chrome  */
    }
}

This is taken from another post here

like image 108
Brian Scott Avatar answered Sep 19 '22 15:09

Brian Scott