Epidemic Posted November 10, 2008 Share Posted November 10, 2008 Hey, I want to use a table with a black border only on the right hand side to create a navigation bar. The table will be on the very left hand side of the page and run the full height of the page. However I do not know how I can get the table to run the whole way down the page and just have a 1 pixel black line border only on the right hand side of the table to create a single line down the left hand side of the page to create a navigation bar. My example: Hope you can help. Josh Quote Link to comment Share on other sites More sharing options...
haku Posted November 11, 2008 Share Posted November 11, 2008 Use this CSS on the table: border-right: solid black 1px; Quote Link to comment Share on other sites More sharing options...
SuperBlue Posted November 11, 2008 Share Posted November 11, 2008 I would really recommend that you move on to CSS based layouts. Above posted solution can be applied through the use of the style attribute, or embedded css. However using external stylesheets is by far the best method. Quote Link to comment Share on other sites More sharing options...
Epidemic Posted November 11, 2008 Author Share Posted November 11, 2008 I'm using: <table height="100%" width="150px"> But it isn't stretching the whole page. There is a white gap at the bottom. Quote Link to comment Share on other sites More sharing options...
SuperBlue Posted November 11, 2008 Share Posted November 11, 2008 Try adding margin: 0; padding: 0; to your body, I.e <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <title>My first Website</title> <style type="text/css"> html, body { margin: 0; padding: 0; height: 100%; } #leftColumn { border-left: 1px solid black; } </style> </head> <body> <table height="100%"> <tr> <td id="rightColumn" width="155px" valign="top">Test</td> <td id="leftColumn" valign="top">Test</td> </tr> </table> </body> </html> Quote Link to comment Share on other sites More sharing options...
Epidemic Posted November 11, 2008 Author Share Posted November 11, 2008 Try adding margin: 0; padding: 0; to your body, I.e <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <title>My first Website</title> <style type="text/css"> html, body { margin: 0; padding: 0; height: 100%; } #leftColumn { border-left: 1px solid black; } </style> </head> <body> <table height="100%"> <tr> <td id="rightColumn" width="155px" valign="top">Test</td> <td id="leftColumn" valign="top">Test</td> </tr> </table> </body> </html> Worked like a charm. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.