I've put a sample web page at
http://gavelcade.com/tests/font-styles-lost.html
that illustrates strange inconsistencies both among and within browsers in a
situation where I've applied styles to various parts of a table, including
COL elements (though that may or may not be the cause of the problem. Both
HTML and CSS pass validation.
I assigned the class "project-data-attribute" to the first of two columns in
tables (having class "project-data") like the following:
Grantee: Aardvark College
Project Director: Dr. Aaron Aramanian
Project Title: Fifty Ways to Leave Your Lover
I want to specify the width of the first column and have it bolded. The
following rule is theoretically applicable.
table.project-data .project-data-attribute {
width: 10em;
font-weight: bold; }
I tested this in IE6, Netscape 7, Firefox 1.0, and Opera 7.54. The width is
set correctly in ALL of these browsers BUT only IE boldfaces the text!
Exploring further, I added two more properties to this rule:
table.project-data .project-data-attribute {
width: 10em;
background-color: #ee9;
color: #42c;
font-weight: bold; }
As with boldfacing, the text color is only applied by IE6. The text remains
black in the other browsers. Even more oddly, the background color *does*
show up in Firefox and Opera as well as in IE--but it doesn't show up in
Netscape.
Testing whether it was a somehow a specificity problem, I changed
..project-data-attribute to col.project-data-attribute, but that didn't make
any difference. I even tried making it less specific, removing the
table.project-data container selector, but no change in result.
Comments? Alternative approaches, short of applying the class to each of the
first-child TDs individually? Thanks.
--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.