Lines

liunx

Guest
How do i put single lines? Like a table has four lines..but I only one "one" of the four on one side, get what i'am saying? I know the <hr> tag adds a line across screen..but I want to be able to add vertical lines. Maybe this will help...go to <!-- w --><a class="postlink" href="http://www.importtuner.com">www.importtuner.com</a><!-- w --> see the single lines they have to devide the categories? Thats what I want! Please Help!:)<!--content-->2 general ways of doing this. The first is to use CSS stylesheets. In CSS, you can use the border-lefdt, border-right, border-top and border-bottom to get the laout you want. The problem with this is that I think some older browsers (notably Netscape 4.x) don't support it.<br />
<br />
Eg (border at top and bottom...)<br />
<style type="text/css"><br />
.bordered {<br />
border-top: solid black 1px;<br />
border-bottom: solid black 1px;<br />
}<br />
</style><br />
<br />
The other way (and the way I use, is to just add another row or column to you table 1px wide or 1 px high (depending on whether it is a row or column) and change the background color of the <td> cell to black, or whatever color you want the border to be.<br />
<br />
Eg. (border at top and bottom...)<br />
<table cellpadding="0" cellspacing="0"><br />
<tr><br />
<td height="1" width="100%" bgcolor="#000000"><img src=http://www.htmlforums.com/archive/index.php/"blankpixel.gif" height="1" width="1"></td><br />
</tr><br />
<tr><br />
<td>Normal stuff in here...</td><br />
</tr><br />
<td height="1" width="100%" bgcolor="#000000"><img src=http://www.htmlforums.com/archive/index.php/"blankpixel.gif" height="1" width="1"></td><br />
</tr><br />
</table><br />
<br />
Note: To satisy Netscape, I have used a 1px X 1px transparent gif (blankpixel.gif) to put in the cells where I want a border to show. Netscape doesn't like empty <td> cells. Every programmer should havce one of these in his / her toolbox... :)<br />
<br />
Hope that helps<!--content-->You can hide the external borders and only have the internal vertical borders showing by adding these attributes to your <table> tag.<br />
<br />
border frame=void rules=cols bordercolor=#000000 <br />
<br />
The only problem is that it only works well in IE. You're better off using an image as described by Inch.<!--content-->
 
Back
Top