This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > November 2004 > Strange browser differences in handling of COL styles





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Strange browser differences in handling of COL styles
Harlan Messinger

2004-11-18, 7:17 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.

Neal

2004-11-18, 7:17 pm

On Thu, 18 Nov 2004 14:02:12 -0500, Harlan Messinger
<h.messinger@comcast.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.

Neal

2004-11-18, 7:17 pm

On Thu, 18 Nov 2004 14:28:56 -0500, Neal <neal413@yahoo.com> wrote:

> On Thu, 18 Nov 2004 14:02:12 -0500, Harlan Messinger
> <h.messinger@comcast.net> wrote:
>
>
>
> 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]
Harlan Messinger

2004-11-18, 7:17 pm


"Neal" <neal413@yahoo.com> wrote in message
news:opshodsolo6v6656@news.individual.net...
> On Thu, 18 Nov 2004 14:28:56 -0500, Neal <neal413@yahoo.com> wrote:
>
>
> Forgot to add: [http://ln.hixie.ch/?start=1070385285&count=1]


OK, thank you very much. But--bah! At least my grief is shared.

Harlan Messinger

2004-11-21, 4:17 am


"Neal" <neal413@yahoo.com> wrote in message
news:opshodsolo6v6656@news.individual.net...
> On Thu, 18 Nov 2004 14:28:56 -0500, Neal <neal413@yahoo.com> wrote:
>
>
> Forgot to add: [http://ln.hixie.ch/?start=1070385285&count=1]


OK, thank you very much. But--bah! At least my grief is shared.

Neal

2004-11-21, 12:17 pm

On Thu, 18 Nov 2004 14:28:56 -0500, Neal <neal413@yahoo.com> wrote:

> On Thu, 18 Nov 2004 14:02:12 -0500, Harlan Messinger
> <h.messinger@comcast.net> wrote:
>
>
>
> 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]
Neal

2004-11-22, 11:22 pm

On Thu, 18 Nov 2004 14:02:12 -0500, Harlan Messinger
<h.messinger@comcast.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.

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews