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

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.