Results 1 to 2 of 2

Thread: align a table to the top of page..

  1. #1
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default align a table to the top of page..

    how would I align this table to the top of the page? when i use the top margin and set a negative value it turns out differnet in different browsers.. Its either to much or not enough to the top.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    body,td,th {
    	color: #FFFFFF;
    }
    body {
    	background-color: #666666;
    }
    -->
    </style></head>
    
    <body>
    <table width="510" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000">
      <tr>
        <td width="510" height="88" bgcolor="#999999">This table needs to be moved up to the top of the page. But when using the top margin and using negative pixels looks different in other browsers. </td>
      </tr>
    </table>
    </body>
    </html>
    Attachment 1036<-- Download the page here...

    I have attached a zip of the above as a .html if that helps.

  2. #2
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default

    ok i figured it out. i was putting the top margin stuff in the html for the table and not for the body.

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
  •