Jump to content

aligning tables


pneudralics

Recommended Posts

Well a simple table that would have a header and then a navigation column and a main content area, that would look like:

[code]
+----------------+
|                |
+----+-----------+
|    |           |
|    |           |
|    |           |
|    |           |
|    |           |
|    |           |
|    |           |
+----+-----------+[/code]

You would use the code:

[code]<table width="760" border="0" cellpadding="5" cellspacing="0">
    <tr>
        <td colspan="2">
            Header content here
        </td>
    </tr>
    <tr>
        <td width="25%">
            Navigation here
        </td>
        <td width="75%">
            Main content
        </td>
    </tr>
</table>[/code]
Link to comment
Share on other sites

  • 5 weeks later...
If you want a column on the left and the right use something like this:
[code]<table width="100%" border="1">
  <tr><td colspan="3">This is the title bar</td></tr>
  <tr>
    <td valign="top">LEFT COLUMN</td>
    <td valign="top">MIDDLE COLUMN</td>
    <td valign="top">RIGHT COLUMN</td>
  </tr>
</table>[/code]
Change border to 0 when you are happy. Having [b]valign="top"[/b] makes sure that the contents of each column are aligned to the top.

Just replace the above text showing each column with more table declarations, hope its what you were asking for :)
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.