Forum Moderators: not2easy

Message Too Old, No Replies

Border around table from css - thinner on outside

         

KatieWestbrook

2:10 pm on Mar 10, 2005 (gmt 0)

10+ Year Member



Hi,

Thanks to earlier help, I have been able to get a border aorund a table and individual cells within it - now unfortunately the border on the outside of the table is thinner than in the middle!

Here is the code:

table.ts1general,
table.tslgeneral td {
font-family : Verdana, Arial, Helvetica, Geneva, sans-serif; font-weight: normal; color: #000000; vertical-align: top;
border: 1px solid #399;
}
table.tslgeneral th {
font-family : Verdana, Arial, Helvetica, Geneva, sans-serif; font-weight: strong; color: #000000; vertical-align: top; background-color: #dee6e8;
border: 1px solid #399;
}

Can anyone help?

The class can only be applied to the whole table, not individual rows or cells.

Thanks.

firstreflex

6:02 pm on Mar 10, 2005 (gmt 0)

10+ Year Member



I think it is because you are adding a border to the table and the cells, I think this should work (except in IE5/mac)


table.ts1general {
border-collapse:collapse;
}
table.tslgeneral td {
font-family : Verdana, Arial, Helvetica, Geneva, sans-serif; font-weight: normal; color: #000000; vertical-align: top;
border: 1px solid #399;
}
table.tslgeneral th {
font-family : Verdana, Arial, Helvetica, Geneva, sans-serif; font-weight: strong; color: #000000; vertical-align: top; background-color: #dee6e8;
border: 1px solid #399;
}

For it to also work in IE5/mac I think you would need this:

table.ts1general {
border-top: 1px solid #399;
border-left: 1px solid #399;
border-collapse:collapse;
}
table.tslgeneral td {
font-family : Verdana, Arial, Helvetica, Geneva, sans-serif; font-weight: normal; color: #000000; vertical-align: top;
border-bottom: 1px solid #399;
border-right: 1px solid #399;
}
table.tslgeneral th {
font-family : Verdana, Arial, Helvetica, Geneva, sans-serif; font-weight: strong; color: #000000; vertical-align: top; background-color: #dee6e8;
border-bottom: 1px solid #399;
border-right: 1px solid #399;
}

KatieWestbrook

3:51 pm on Mar 23, 2005 (gmt 0)

10+ Year Member



Brill, thanks.

What I've ended up with, which works, is:

table.ts1general {
border-collapse:collapse;
}
table.tslgeneral td {
font-family : Verdana, Arial, Helvetica, Geneva, sans-serif; font-weight: normal; color: #000000; vertical-align: top;
border-bottom: 1px solid #399;
border-left: 1px solid #399;
border-right: 1px solid #399;
}
table.tslgeneral th {
font-family : Verdana, Arial, Helvetica, Geneva, sans-serif; font-weight: strong; color: #000000; vertical-align: top; background-color: #dee6e8;
border-top: 1px solid #399;
border-left: 1px solid #399;
border-bottom: 1px solid #399;
border-right: 1px solid #399;
}