psypent81 Posted May 4, 2007 Share Posted May 4, 2007 Ok, lame newbie question.What does the value of "Inherit" mean? I have a CSS book that assume I know what that means in terms of CSS. Can anyone give me a quick explanation of the meaning?I would really appreciate it.Thanks-psypent Link to comment Share on other sites More sharing options...
zppblood Posted May 7, 2007 Share Posted May 7, 2007 http://www.devarticles.com/c/a/Web-Style-S...-and-Cascade/3/"CSS inheritance means simply passing the values of some properties to the descendant elements of the element." Link to comment Share on other sites More sharing options...
jesh Posted May 7, 2007 Share Posted May 7, 2007 Here's a concrete example for you regarding inheritance: <html><head><style>.red { color: red; }</style></head><body><div class="red"><p>Here is a paragraph.</p><ol> <li>An ordered list.</li> <li>With two elements</li></ol></div></body></html> If you want all of the elements (the <p></p> and the <ol><li></li></ol>) to have the same style as the parent element (the <div></div>), you can set the style for the parent element and it will be inherited by the child elements (i.e. they are all red in this example). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.