Welcome to WebmasterWorld Guest from 54.196.94.176

Forum Moderators: not2easy

Message Too Old, No Replies

Borders on a Table Row

Borders on a Table Row

     
4:31 pm on Jan 17, 2003 (gmt 0)

10+ Year Member



I have a style sheet class on a table row. All the styles work fine except for the border. When I set the same style on a table cell, the border shows. On the table row, the border does not show. How can I have a border around a table row?

Here's my style:
.trborder

{
BORDER-RIGHT: #000000 1px solid;
BORDER-TOP: #000000 1px solid;
FONT-SIZE: x-small;
BORDER-LEFT: #000000 1px solid;
COLOR: black;
BORDER-BOTTOM: #000000 1px solid;
FONT-FAMILY: Tahoma, Verdana, Arial
}

4:38 pm on Jan 17, 2003 (gmt 0)

WebmasterWorld Senior Member suzyuk is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Hi Georgea Welcome to WW

You have the incorrect syntax for your borders code:

BORDER-RIGHT: #000000 1px solid;

it should be
BORDER-RIGHT: 1px solid #000000;

Suzy

4:44 pm on Jan 17, 2003 (gmt 0)

10+ Year Member



That still didn't work. On a table cell, it shows the border. On a table row, it does not.

<style>
.trborder

{

BORDER-RIGHT: 1px solid #000000;
BORDER-TOP: 1px solid #000000;
FONT-SIZE: x-small;
BORDER-LEFT: 1px solid #000000;
COLOR: black;
BORDER-BOTTOM: 1px solid #000000;
FONT-FAMILY: Tahoma, Verdana, Arial
}
</style>
<table>
<tr class="trBorder">
<td>hello1</td>
<td>hello2</td>
<td>hello3</td>
<td>hello4</td>
</tr>
</table>

4:47 pm on Jan 17, 2003 (gmt 0)

WebmasterWorld Senior Member blobfisk is a WebmasterWorld Top Contributor of All Time 10+ Year Member



As far as I know you can't put a border on a table row, but you can on the table cell ( <td> ).

With some creative border-right and border-left, with a cell-spacing of 0, you should be able to achieve the appearance of a border around the whole row.

4:53 pm on Jan 17, 2003 (gmt 0)

WebmasterWorld Senior Member suzyuk is a WebmasterWorld Top Contributor of All Time 10+ Year Member



you're right Blobfisk

I'll give myself a slap ;) I just saw the code and not the <tr>

sorry Georgea!

 

Featured Threads

Hot Threads This Week

Hot Threads This Month