Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get only one side of a border on a table

Status
Not open for further replies.

Bravogolf

Programmer
Nov 29, 2002
204
GB
Hi,
I need to create a table that displays only the right hand side of the table border that will be one pixel in width.
I assume this is done with CSS, as I have the following code to customise a table:

<table summary=&quot;&quot; class=&quot;bodyl&quot;>
.....
And the CSS is:
.bodyl{background: #f7f8fc;color:#000000;border: 1px solid #000000 }

I have tried inserting code to make only the right border appear but cant get the syntax right.

If I insert the following table tag instead of using CSS:

<table summary=&quot;&quot; border=&quot;1&quot; width=&quot;500&quot; bordercolor=&quot;#66CC33&quot; bgcolor=&quot;#FFFFFF&quot; frame=&quot;rhs&quot;>
<tr>
<td>

 </td>
</tr>
</table>

the code wont appear correctly, as the border is too thick.

Can anyone help?
 
I believe to declare different (or no) borders, delcare top, right, bottom, left - such as

body
{
border-style: solid;
border-width: 0px 1px 0px 0px
}

Hope this helps,
Max

 
hi maxformed,
I couldnt get that code working. Also, I omitted to mention in the previous post, that I will have many tables in the one page, and it is only one or two that I want the right border to appear.

 
Hi maxformed,
Got it working thanks.
Many thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top