Simple CSS question

Soldato
Joined
1 Feb 2006
Posts
8,188
Hi,

Just testing a site here in IE7 and I have italic font within one div. In the next div I want this to be normal but it seems to inherit from the above div. What is the best practice here... declare font-style:normal in the body tag and then change to just italic in the required div so that everything else will inherit from the body tag? Or is there anything like a "clear:font" function that will stop any inherited font behaviour? I have never came across anything like it but it could be handy. I'm guessing just adding font-style definitions to all subsequent divs would be the solution but it seems a bit extra hassle if you have a lot of content.

This issue only appears in IE7 so maybe its just a bug for it only. Any suggestions?
 
Yeah I usually would do that but in this occasion the italics seemed to have been inherited. It just seemed to be an IE specific bug....Nothing new there I guess! I would say I am pretty confident with CSS after doing quite a bit with it but just thought the inheritance thing was a bit weird. Thanks for the help.
 
Back
Top Bottom