tags:

views:

48

answers:

3

Hello,

Where to look when I want to know all the default css settings? for Google Chrome, IE, and Firefox, to start with.

Thanks for helping

+3  A: 

You can't really do that. You may be able to find reference guides if you Google it, but they would probably be guess-work. Your best option is probably to use a CSS Reset to make sure every browser is reset to the same CSS, then you have a good base to build on.

Eric Meyer's reset is my favourite: http://meyerweb.com/eric/tools/css/reset/

Liggi
@Liggi: Thanks for the article. But, I still have a question. what should I do to reset to the same css? Make it appear before any real work? put everything in a separate sheet and reference it first?
Richard77
Using a reset CSS is certainly one approach. However there is another school of thought which holds that it is better to know exactly what the browsers you intend to support actually do by default. You can then override from a position of knowledge, as opposed to applying general resets like *{margin:0;}
Mark Chorley
@Richard Place it in front of all your other styles. If you place it at the back, or in the middle, the stuff in the reset style may override some things you defined earlier.
Yi Jiang
@Richard77 It's really up to you, as long as it comes before everything else. Personally I put it in a separate CSS file and reference it before the main one.
Liggi
@Mark It's not as simple as selecting everything, you know. Using a reset stylesheet means that you have one less thing to think about when working on the CSS, instead of having to memorize/look up the default styles applied by the browsers
Yi Jiang
@Yi Jiang. Agreed, personally I prefer to use a reset CSS file for speed reasons. However the OP was asking how to find out the User Agent stylesheet locations, and I was just noting that some people prefer to write their own overrides. If I was a pure CSS developer I might well do the same.
Mark Chorley
+4  A: 

Firefox's CSS files are in /whereverfirefoxisinstalled/gre/

These two are probably of most interest, but there are some others in there as well which should not be ignored.

forms.css html.css

You can use the Firebug addon to see what is being applied to the page you're working on. When inspecting an element, select "show user agent CSS" from the style dropdown in the right hand panel.

Mark Chorley
I didn't know that. Is there an equivalent for any other browsers?
Liggi
+1  A: 

I also recommend using stylesheet to reset.

However for the default settings in Chrome you can:

  1. Create a blank page.
  2. Open in Chrome
  3. Right Click on page
  4. Inspect Element

Use the inspector to see what's going on with your body element.

Use the drop downs on the right to see more styling rules.

diggersworld