Jump to content

[SOLVED] Using a line as a navigation menu?


Epidemic

Recommended Posts

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:

 

13zphg8.png

 

Hope you can help.

 

Josh

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>

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 :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.