homepage Welcome to WebmasterWorld Guest from 54.196.159.11
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Borders on a Table Row
Borders on a Table Row
georgea623




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

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
}

 

SuzyUK




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

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

georgea623




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

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>

BlobFisk




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

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.

SuzyUK




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

you're right Blobfisk

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

sorry Georgea!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved