Yes, inline styles trump (overwrite) rules set for the element, but if you
put h1 { color:red; } then your h1 style="stuff-here" will be red, unless
the inline style specifies something else for color. My hunch is the
original poster wants to prevent that single h1 from being red without
having any other way to target the element, other than it has a style
attribute. I have to deal with stuff like this all the time making CMS
systems that let users enter h1, h2, in a wysiwyg editor, and I have other
h1 & h2 on the page I don't want to be styled the same. Consider the
following example, where it is desired to have Other Story not inherit red
color and bottom border:

h1 { border-bottom:2px solid red; color: red; font-family:serif; }

<h1>Title One</h1>
<h1>Title Two</h1>
<!-- user generated content -->
<h1 style="font-family:Arial, sans-serif;">Other Story</h1>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to