Reputation: 271
I am trying to create a text shadow in Mozilla browsers only. (I'm using this as a workaround for some issues with a font that I'm using.)
I have tried -moz-text-shadow
, but it seems that this is now defunct and it no longer needs the moz extension. But I don't want Internet Explorer and WebKit to use the text shadow.
Why would the -moz
function be taken away?
Upvotes: 2
Views: 7242
Reputation: 9437
-moz
, -webkit
, -o
, and -ms
are called browser prefixes. They are used for browsers that didn't support the property fully.
And now every modern browser except Internet Explorer 8 and lower support the text-shadow
property.
You can use JavaScript to detect the browser and add the text shadows property if you want to force adding a text shadow for just Firefox.
Upvotes: 1
Reputation: 75379
You can target Firefox alone by using a CSS hack, such as:
body:not(:-moz-handler-blocked) a { background-color: red; }
Quick demo: http://jsfiddle.net/DxjeL/
The box should be red for Firefox and blue for all the other browsers.
This is from Browser CSS Hacks.
Upvotes: 5
Reputation: 87
Rough example:
text-shadow: 0 0 transparent;
-webkit-text-shadow: 0 0 transparent;
-khtml-text-shadow: 0 0 transparent;
-moz-text-shadow: 1px 1px #ff0000;
Upvotes: 0