views:

827

answers:

7

Are there any lists of browser CSS defaults? (browser stylsheets in tabular form)

I want to know the default font of textareas across all browsers and also for future reference.

+4  A: 

You cannot possibly know all defaults for all configurations of all browsers into the future.

The way people get around this is to start their CSS by resetting everything to known values. Here's an example from one of the main CSS experts: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/

Will Dean
+4  A: 

I suspect this is something of a moving target for all the browsers, but there is a default style sheet for HTML 4 as defined my the W3C.

Greg Hurlman
+12  A: 

There probably is a list, this is why we use CSS Resets however.

Ross
+1  A: 

There was some discussion and testing done on www-style not too long ago:

http://lists.w3.org/Archives/Public/www-style/2008Jul/0124.html

http://lists.w3.org/Archives/Public/www-style/2008Jul/att-0124/defaultstyles.htm

Shadow2531
A: 

@Ross & Will Dean

I use a CSS reset normally however I can't now as it's for a jQuery plugin and I can't really change other peoples fonts.

Annan
+1  A: 

@Annan

OK, I understand that. So far I'm not having much luck researching this so it could be a good data collection/reference project someday!

I know Firefox and IE have differences in how textareas are handled (as with most things IE adds a scrollbar) but I think that the font size is usually the same.

If you don't find anything I'd just add a note advising to set textarea fonts to a font-size for best use of the plugin - I'd find that pefectly acceptable.

Ross
A: 

Not tabular, but the source CSS may be helpful if you're looking for something specific:

You're on your own with IE and Opera though.

robertc