views:

27

answers:

3

Can you use the browser specific prefix in front of all standard tags?

e.g.

#div{

 padding:20px;
-moz-padding-bottom:10px;

} 

is the above valid CSS for ensuring Firefox has a different bottom padding to all other browsers?

+1  A: 

You can always do it, but the style will be ignored by browsers who don't understand it and the the CSS won't pass CSS Validation.

Gert G
Yes, you can try to use anything you like as a style, like `eye-color` or `blast-radius`... ;)
Guffa
+1  A: 

No, it's not a prefix for targetting a browser, it's a prefix that is used for specific non-standard properties like -moz-opacity or -moz-padding-start. It's not available for the standard properties.

Guffa
+1  A: 

First, no, there isn't a prefix for things that are standardized, since they're the same property cross-browser (or should be, don't take this for granted in IE).

Instead of what you're after with this prefix, I'd instead look at a completely different approach...taking out the differences in rendering, instead of trying to fix them, at least as many as possible.

Take a look at a CSS reset stylesheet, to normalize the padding and such across browsers, then look at fixing any remaining quirks.

Nick Craver