"David Dorward" <do*****@yahoo.com> wrote in message
news:d0*******************@news.demon.co.uk...
Sergey Ilinsky wrote:
How can i override all the styles being cascaded applied to some HTML
element?
By *explicitly* setting different styles.
Or create a class for the attributes you want, then don't include that
class on the elements for which you want the default behaviour. This
keeps you from having to determine what the default CSS values are and
setting a class with those styles.
I would like to not have the inner DIV padding, margin and other
directives described in styles above. Actually I would like to
discover some directive line "override:all"!
No such property exists.
Which is why I'd do it something like this:
<style type="text/css">
div.paddedWithMargin {
padding: 10px; margin: 10px;
}
</style>
<div>This will have the default padding and margin values</div>
<div class="paddedWithMargin">This will have your custom padding and
margin values</div>
Adding a class to every -div- on the page can be a bit cumbersome if you
want every -div- to have the custom CSS style except for one. To fix
that, you could use something like:
<style type="text/css">
div.paddedWithMargin div {
padding: 10px; margin: 10px;
}
</style>
<div>This will have the default padding and margin values</div>
<div class="paddedWithMargin">
<div>This will have your custom padding and margin values</div>
<div>This will have your custom padding and margin values</div>
<div>This will have your custom padding and margin values</div>
<div>This will have your custom padding and margin values</div>
</div>
Anyway, what does any of this have to do with JavaScript?
--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ -
http://jibbering.com/faq