Closed Thread
Results 1 to 6 of 6

Thread: vertical line - how to

  1. #1
    Junior Member gthorley is an unknown quantity at this point
    Join Date
    Nov 2000
    Posts
    6
    If I want to have 3 colums on a page with vertical lines seperating the middle column from the outer ones what is the best way to write this.

    I was thinking of setting up a table with 5 columns and making the second and fourth with say 2 pixel width and then putting a line gif in each. Is there an easier or better way?

  2. #2
    NLC Nick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to behold Nick's Avatar
    Join Date
    Oct 2000
    Location
    United States
    Posts
    3,493
    Make a one pixel table cell in the middle with the BGCOLOR tag set to the color of the line and insert a 1x1 pixel gif in the cell. Make sure it looks like this:

    Code:
    <td width="1" bgcolor="#000000"><img src="pix.gif" width="1" height="1"></td>
    and not

    Code:
    <td width="1" bgcolor="#000000"> <img src="pix.gif" width="1" height="1"> </td>
    Because spaces will screw it up.
    Nick

  3. #3
    Junior Member gthorley is an unknown quantity at this point
    Join Date
    Nov 2000
    Posts
    6
    Thanks Nick

    I was using something similar but your line gives me a thicker line than I want. Your line is correct but it is effected by some other code in my html. I can't see what though. Not the border ="1" I put that in temp to see the outline.
    I have posted below

    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body bgcolor="#FFFFFF">
    <table width="35%" border="1" height="100">
    <tr>
    <td>-</td>
    </tr>
    </table>
    -
    <table width="760" border="1" height="800" align="center">
    <tr valign="top">
    <td>
    -
    <table width="760" border="1" height="700" cellpadding="2" align="center">
    <tr>
    <td valign="top" width="213">-
    <table width="100%" border="1" height="12">
    <tr>
    <td height="27">-</td>
    </tr>
    </table>
    <table width="100%" border="1" height="12">
    <tr>
    <td height="27">-</td>
    </tr>
    </table>
    <table width="100%" border="1" height="12">
    <tr>
    <td height="27">-</td>
    </tr>
    </table>
    <table width="100%" border="1" height="12">
    <tr>
    <td height="27">-</td>
    </tr>
    </table>
    <table width="100%" border="1" height="12">
    <tr>
    <td height="27">-</td>
    </tr>
    </table>
    <table width="100%" border="1" height="12">
    <tr>
    <td height="27">-</td>
    </tr>
    </table>
    </td>
    <td width="1" bgcolor="#808080"><img src="spacer.gif" width="1" height="1"> </td>


    <td width="318" valign="top"> This is just a test to see what the alignment
    is going to be like
    <hr>

    </td>

    <td width="1" bgcolor="#808080"><img src="spacer.gif" width="1" height="1"> </td>


    <td width="213" valign="top">-
    <table width="100%" border="1" height="100">
    <tr>
    <td>-</td>
    </tr>
    </table></td>
    </tr>
    </table>
    -
    </td>
    </tr>
    </table>
    -
    </body>
    </html>

  4. #4
    NLC Nick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to behold Nick's Avatar
    Join Date
    Oct 2000
    Location
    United States
    Posts
    3,493
    Simple answer: cellpadding.

    Cellpadding has to be cellpadding="0" for this effect. Use cellspacing="2" cellpadding="0" to get around this.
    Nick

  5. #5
    Junior Member gthorley is an unknown quantity at this point
    Join Date
    Nov 2000
    Posts
    6
    Wonderful, that was the problem.

    Thanks

  6. #6
    NLC Nick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to beholdNick is a splendid one to behold Nick's Avatar
    Join Date
    Oct 2000
    Location
    United States
    Posts
    3,493
    No problem, glad to be of some help
    Nick

Closed Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts