Results 1 to 4 of 4

Thread: Help with alignment of tables

  1. #1
    Join Date
    Apr 2008
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with alignment of tables

    I am running into a problem with verticle aligment.

    Following is the code for what i am trying to achieve. I want to have 3 columns on the page so i have created a table with 3 columns and inside each column i have put a table. The problem arises is that when i had content to any of the 3 columns i loose the 'top' verticle alignmnet in the other columns and they start drifting down the page.

    Any suggestions would be appreciated

    Code:
    <html>
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>New Page 1</title>
    </head>
    
    <body>
    
            <table border="0" width="100%" height="619">
              <tr>
                <td width="20%" height="588">
                  <div align="center">
                    <table border="0" width="103%" height="1">
                      <tr>
                        <td width="100%" height="1"><font face="Arial">video</font>
                          <p>&nbsp;</p>
                          <p>&nbsp;</p>
                        </td>
                      </tr>
                      <tr>
                        <td width="100%" height="171">&nbsp;
                          <p><font face="Arial">quick links</font></p>
                        </td>
                      </tr>
                      <tr>
                        <td width="100%" height="57"><font face="Arial">what the clients have to say</font>
                          <p>&nbsp;
                          <p>&nbsp;</td>
                      </tr>
                      <tr>
                        <td width="100%" height="1"></td>
                      </tr>
                    </table>
                  </div>
                </td>
                <td width="61%" height="588">
                  <table border="2" width="100%" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000" bgcolor="#FFFFFF" valign="top" height="290">
                    <tr>
                      <td width="100%" bgcolor="#FFFFFF" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" height="284">
                        <p class="MsoNormal" style="margin-left: 0pt; margin-top: 0pt; margin-bottom: 0pt">&nbsp;</p>
                        <p class="MsoNormal" style="margin-left: 0pt; margin-top: 0pt; margin-bottom: 0pt"><span lang="EN-US"><font size="2" face="Arial">df</font></span></p>
                        <p class="MsoNormal" style="margin-left: 0pt; margin-top: 0pt; margin-bottom: 0pt">&nbsp;
                        <p class="MsoNormal" style="margin-left: 0pt; margin-top: 0pt; margin-bottom: 0pt">&nbsp;
                        <p>&nbsp;</td>
                    </tr>
                  </table>
                  <table border="1" width="100%" height="49">
                    <tr>
                      <td width="100%" height="43">
                        <p align="center"><font face="Arial">what we can do for you</font></p>
                        <p align="center">&nbsp;</p>
                        <p align="center">&nbsp;</p>
                      </td>
                    </tr>
                  </table>
                  <div align="center">
                    <table border="1" width="100%" height="241">
                      <tr>
                        <td width="50%" valign="top" align="center" height="235"><font face="Arial">&nbsp;news</font>
                        </td>
                        <td width="50%" valign="top" align="center" height="235"><font face="Arial">Case
                          histories</font></td>
                      </tr>
                    </table>
                  </div>
                </td>
                <td width="19%" height="588">
                  <div align="center">
                    <table border="0" width="97%" height="116" valign="top" style="position: relative; top: 0">
                      <tr>
                        <td width="100%" valign="top" align="center" height="1">
                          <p style="margin-top: 0; margin-bottom: 6">
                <b>
                <font size="1" face="Arial">Page updated&nbsp;10 Dec '09</font></b></td>
                      </tr>
                      <tr>
                        <td width="100%" valign="top" align="center" height="133">
                        </td>
                      </tr>
                      <tr>
                        <td width="100%" valign="top" align="center" height="286">
                          <p></p>
                        </td>
                      </tr>
                      <tr>
                        <td width="100%" valign="top" align="center" height="171">&nbsp;<p><font face="Arial">Training</font></p>
                          <p>&nbsp;</p>
                          <p>&nbsp;</p>
                          <p>&nbsp;</td>
                      </tr>
                      <tr>
                        <td width="100%" valign="top" align="center" height="1"><font face="Arial">Research</font>
                          <p>&nbsp;</p>
    
                          <p>&nbsp;</td>
                      </tr>
                    </table>
                  </div>
                </td>
              </tr>
            </table>
    
    </body>
    
    </html>

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Add this (highlighted) as shown:

    Code:
    <html>
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>New Page 1</title>
    <style type="text/css">
    td {
    	vertical-align: top;
    }
    </style>
    </head>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Apr 2008
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks for that

  4. #4
    Join Date
    Sep 2009
    Location
    pakistan
    Posts
    28
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    You should set the alignment of the outer table
    1. in case of CSS define
    vertical-align:top;

    2.Otherwise in in table tag
    <table .... valign="top">

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
  •