Is the cell inheriting any other styles from anywhere else ?
Your code looks fine.
Main Topics
Browse All TopicsWith the following html:
<table><tr><td width="100%" height="14" class="categoriesHeading">
and the following formatting in a css file:
TD.categoriesHeading {
font-family: Arial, Helvetica, Verdana, Geneva, sans-serif;
font-size: 12px;
font-weight: bold;
text-align: center;
text-indent: 0px;
color: #ffffff;
background: #002f65;
padding: 5px 2px 3px 5px;
}
The table cell appears with white text on a blue background with IE, but all formatting is lost with Firefox. Any clues please?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
CSS itself does not use inheritance. It uses a "cascading" mechanism.
Each element in the page is matched against the different selectors.
When an element matches the selector, the attributes are set on that element.
In case of conflicting attribute values, it's the most specific selector that will override the others.
When 2 selectors have the same "specificity" it's the latest in the order of declaration that will win.
The complete rules for calculating the specificity are a little complicated, but in most cases it's obvious.
In your 2 stylesheets, you probably have the exact same selectors (same specificity) with different attribute values. This means that, in case of conflicting attribute values, the rules in the second linked stylesheet will overide the rules first linked stylesheet.
Now, some attributes are inherited by the child nodes of an element (like "font-family" for instance), and some are not inherited (like "width" for instance). But that's a completely different thing.
Get the webdev toolbar for firefox: https://addons.mozilla.org
Use the menu: CSS/View style information. Now, when you click an element, it will show you which css rules are applied to that element.
Where is this include in the resulting HTML document? Stylesheet calls need to be in the head tags, if it's not there it's very likely it won't work. Also, what doctype are you using? If you're using XHTML, I'm pretty sure all tags have to be lowercase, not upper. So while TD might not work, I suspect td would. Especially if you're using td in the actual HTML -- in XHTML, the case has to match.
Don't go by IE -- it's almost always wrong. And there are very few things that work in Firefox and don't work in IE.
Business Accounts
Answer for Membership
by: GrandSchtroumpfPosted on 2005-09-25 at 11:22:12ID: 14954792
The code you provided gives the same results in both IE and FF: white text on blue bg.
There must be something else wrong with your page.