3 replies [Last post]
samf
samf's picture
Offline
Enthusiast
Los Angeles, CA
Last seen: 10 years 1 week ago
Los Angeles, CA
Timezone: GMT-5
Joined: 2003-09-29
Posts: 106
Points: 34

I designed a page to show my problem so I could be breif here.
The link is:
http://relatebase.com/library/css/tables/tables.php

First table is of class data1, it's all declared in a separate stylesheet.

Both tables have a <thead> vs. <tr> for first row, and <th> instead of <td> in that row.

What I want to do is "overlay" the colors and borders of the bottom table on top of my data1 class. The rows alternate as palegoldenrod color. The lightsteelblue vertical is declared in a <col> tag above the rows, I named it class="c1"

THE PROBLEM: where the colors mix, I declare those td's a new class (class="c1mx"), including the left and right borders you see in the "address column". Here borders work fine. But I can't figure out for the life of me why the lightsteelblue in the "plain" rows doesn't have the borders (class="c1", declared in <col> above).

I would greatly appreciate help here! Although I'm not able to help a lot on this great forum, I do give of my time on phpbuilder.com, which is my expertise.

Best,
Sam Fullman

Life is complex -- don't make it complicated. If you need help with PHP visit PHP Builder

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 18 years 28 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

why do left-right borders not work consistently

Because you are applying .c1mx against the cells with the yellow background, and getting borders correctly, but not applying borders on the cells with the normal background.

and for
.c1{
border-bottom:1px solid #CCCCCC;
border-right:1px solid #000000;
border-left:1px solid #999999;
background-color:lightsteelblue;
}

you are applying this against the column (COL) to get your blue background, but the borders do not seem to work at all.

Apply it against the odd <TD>'s instead.

Regards
Day

The only way to learn is to do it yourself

samf
samf's picture
Offline
Enthusiast
Los Angeles, CA
Last seen: 10 years 1 week ago
Los Angeles, CA
Timezone: GMT-5
Joined: 2003-09-29
Posts: 106
Points: 34

how come &lt;COL&gt; doesn't work

You're right, that does work, but I wonder why you can't declare it in the <col> vs. the <td>, after all, there is no declaration of any borders left-right anywhere else, and it's obvious that declaring the COLOR in <col> DOES work, but the left and right backgrounds don't. This just seems inconsistent.

If you have any explanations, much appreciated.

Old:
http://relatebase.com/library/css/tables/tables_old.php

New:
http://relatebase.com/library/css/tables/tables.php

Thanks,
Sam Fullman

Life is complex -- don't make it complicated. If you need help with PHP visit PHP Builder

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 18 years 28 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

why do left-right borders not work consistently

Probably just something else that needs fixing with tables.

The only way to learn is to do it yourself