HighDots Forums  

Strange browser differences in handling of COL styles

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Strange browser differences in handling of COL styles in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Harlan Messinger
 
Posts: n/a

Default Strange browser differences in handling of COL styles - 11-18-2004 , 01:02 PM






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.


Reply With Quote
  #2  
Old   
Neal
 
Posts: n/a

Default Re: Strange browser differences in handling of COL styles - 11-18-2004 , 01:28 PM






On Thu, 18 Nov 2004 14:02:12 -0500, Harlan Messinger
<h.messinger (AT) comcast (DOT) net> wrote:

Quote:
Comments? Alternative approaches, short of applying the class to each of
the
first-child TDs individually? Thanks.

You can only use the background, border, visibility and width properties
on col and colgroup.



Reply With Quote
  #3  
Old   
Neal
 
Posts: n/a

Default Re: Strange browser differences in handling of COL styles - 11-18-2004 , 01:30 PM



On Thu, 18 Nov 2004 14:28:56 -0500, Neal <neal413 (AT) yahoo (DOT) com> wrote:

Quote:
On Thu, 18 Nov 2004 14:02:12 -0500, Harlan Messinger
h.messinger (AT) comcast (DOT) net> wrote:

Comments? Alternative approaches, short of applying the class to each
of the
first-child TDs individually? Thanks.


You can only use the background, border, visibility and width properties
on col and colgroup.

Forgot to add: [http://ln.hixie.ch/?start=1070385285&count=1]


Reply With Quote
  #4  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Strange browser differences in handling of COL styles - 11-18-2004 , 02:06 PM




"Neal" <neal413 (AT) yahoo (DOT) com> wrote

Quote:
On Thu, 18 Nov 2004 14:28:56 -0500, Neal <neal413 (AT) yahoo (DOT) com> wrote:

On Thu, 18 Nov 2004 14:02:12 -0500, Harlan Messinger
h.messinger (AT) comcast (DOT) net> wrote:

Comments? Alternative approaches, short of applying the class to each
of the
first-child TDs individually? Thanks.


You can only use the background, border, visibility and width properties
on col and colgroup.


Forgot to add: [http://ln.hixie.ch/?start=1070385285&count=1]
OK, thank you very much. But--bah! At least my grief is shared.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.