Login for Software or Support

CoffeeCup - HTML Editor, Flash & Web Design Software

Over 45,144,778 Downloads in 87 Countries

Tell a Friend About Our Cool Software

CoffeeCup StyleSheet Maker Help Center

Sign In For Priority Support Forgot yours ?
More StyleSheet Maker Help: Other Resources: Contact CoffeeCup:

Send Snail Mail:
CoffeeCup Software
165 Courtland Street
Suite A, Box 312
Atlanta, GA 30303

Give us a call:
Toll Free: 866.734.HTML (4865)
Sales Hotline: 678.495.3480
Fax: 678.495.3481

Understanding Inheritance of Style Properties

Inheritance means the styles of the one set of tags is inherited by another set of tags. For instance, say you have a style named Bob defined like this:

.Bob { font-family: Arial; font-size: small; }

Then you applied the style to the body like this:

<BODY class="Bob">

Inside the body, every other tag will inherit the properties of the style sheet Bob, so text would use the Arial font and be small. Now, suppose in the same document, we have a second style named Dave:

.Dave { font-size: large; }

And then we applied the style Dave to a paragraph within the body tags like this:

<BODY class="Bob">
   <P class="Dave">Hello</P>
</BODY>

What would happen? Because tags within the body inherit the Bob style, the word Hello would use the Arial font. However, since the properties of Dave override the properties of Bob, Hello would appear Large, not small.

Was this article helpful?

StyleSheet Maker Help Index | StyleSheet Maker Homepage

Download Our Software:

... and don't forget about our Free Software

CoffeeCup Home Page | Software | Copyright & Legal | Site Map | © 1996 - 2008 CoffeeCup Software, Inc.