RE: Inheritance

by Julie McClelland <joolianna(at)>

 Date:  Thu, 29 Mar 2001 04:16:23 -0800 (PST)
 To:  "Teri A. Ward" <taw0200(at)>,
 In-Reply-To:  boeing
  todo: View Thread, Original
Wouldn't it also work to just span your style?  Make your stylesheet
with your basic attributes of H1 - H6 defined, then if there's a place
in your document where you want to change them, use SPAN and an inline
style?  This would work with not only H6, but also with all your H's.


--- "Teri A. Ward" <taw0200(at)> wrote:
> Ed sez:
> > >I have some HTML that I want to have the same style as H1, H2 etc.
> except,
> > >say, a different color, or maybe, a little bit different margin,
> for
> > >example.  I don't want to dink with the standard H1, H2, etc.
> > >parameters, so
> > >I thought this would be a good time to inherit (? is that the
> correct term)
> > >the properties of the headers into some new classes for my use.
> > >Can someone
> > >point me to a simple example for doing this?  For example...say I
> wanted to
> > >have a class name MyH6, which had the same style as H6, except the
> text is
> > >white, and the background is blue.  Thanks.
> I'm not positive about this, but I believee that
> you can create a kind of "child" class that's 
> based on a particular element. It will inherit all
> the properties of the main element, and change what
> you specify in the child class. For example:
> H6 	{ font-family: Arial, Helvetica, sans-serif; 
> 	  font-weight: bold; 
> 	  color:black; 
> 	  background-color: yellow }
> { color:white; background-color:blue }
> Like I say, I *think* this will work, but I've
> got one foot out the door and don't have time to
> check it out. Good luck - hope it works for you!
> Teri Anne Ward
> Technical Writer/Web Designer
> Seattle

Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.

HWG hwg-style mailing list archives, maintained by Webmasters @ IWA