Reset to default attributes

liunx

Guest
Just wondering if there's an easy way to set all applicable CSS attributes for a given HTML element to their default values?

CJ :DThe defaults for each element are different in different browsers, just specify some general ones. I put this at this top of my CSS file:*{
margin:0;
padding:0;
list-style-type:none;
}So when I when I use paragraphs I have to tell it this:p{
margin:0.5em;
}It's not the same as the browsers default value, but it's good enough, I just tweak the value until it looks right.Here is a pretty good article and example for setting things to be the same across all browsers. Its not the "default" as all browsers have different browsers.

<!-- m --><a class="postlink" href="http://leftjustified.net/journal/2004/10/19/global-ws-reset/">http://leftjustified.net/journal/2004/1 ... -ws-reset/</a><!-- m -->

but, like David, I have a standard start to my stylesheets that looks pretty much the same as his.


* {
margin: 0;
padding: 0;
}
 
Back
Top