Forum Moderators: not2easy
I started out using the Yahoo UI reset CSS but it doesn't cover everything, just browser biases, and for some reason I can't get my subsequent margins to be recognized within the enclosing div where the reset is happening.
#my_div h1 {
color:white;
font-size:30px;
}
But somewhere in the page's style sheet they declared
h1 {
color:black;
font-style: italic;
border:dotted;
margin-right:20px
}
The color in #my_div won't have any issues overriding the page's main color but there are suddenly other styles (font-style, border, etc) there that I took for granted were at their defaults and aren't. It's a matter of anticipating every single style that theoretically could be a applied to an element and canceling them out with declarations on my enclosing #my_div.
something like this might work:
* { margin:0!important; padding:0!important; border:0!important; font:whatever!important; } which will apply to every tag, or maybe:
div * { margin:0!important; padding:0!important; border:0!important; font:whatever!important; } which will apply to every kind of tag contained within a div etc.
Why not install the Web Developer Toolbar on Firefox, and use the View Style Information function to show all CSS styles that effect an individual element. This'll show you what needs overriding on an element by element basis.