Hello- I have a CSS text mark-up issue I could use some help with. I have a Div Tag that has a "p" tag applied to it. Whnever I try to create an additional class to use for th ep tag within that DIV, it does not "take". Is there anyway to have a Class over-ride the P tag applied to the DIV? Here is the DIV: <div class="InteriorText"> <p>When it comes to technology, have you ever noticed that there is always something that someone doesn't want you to buy?</p></div> Code (markup): Here is the DIV's CSS: .InteriorText p{ color: #666666; font-family: Arial, Helvetica, sans-serif; font-size: 0.8em; } Code (markup): Here is the class I would like to apply to certain P tags within the same DIV, but is being "overridden" by the above CSS: .ContentSubHead { font-size: 2.0em; font-weight: bold; } Code (markup): And finally, the HTML code snippet: <div class="InteriorText"> <p class="_ContentSubHead">When it comes to technology, have you ever noticed that there is always something that someone doesn't want you to buy? </p></div> Code (markup): Any help would be greatly appreciated... Thanks!
Hmm.. Still getting the same thing. Here's the new code: <div class="InteriorText"> <p class="ContentSubHead">When it comes to technology, have you ever noticed that there is always something that someone doesn't want you to buy? </p></div> Code (markup): .ContentSubHead { font-size: 2em; font-weight: bold; } Code (markup): And here is the screenshot:
It still has the DIV's p tag style applied to the header and subhead, instead of the ".ContentSubhead" class. Any ideas? Thanks for your help.
Its called cascading. It will inherit from the DIV because its a child element. Either explicitly override the values set or accept them. It should apply both styles to it effectively. http://img3.freeimagehosting.net/uploads/eafc7b7022.jpg