Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you align table to very top of screen?

Status
Not open for further replies.

techie99

Programmer
Apr 24, 2003
60
0
0
US
I would like to know how you align a table to the very top of the screen. I don't want to see any space between the top edge of the screen and the table and it seems that Internet Explorer, by default, is doing that.

 
You'll need to set margins and paddings on the table as well as on the document to 0px.

try the CSS:
Code:
html,body{
margin-top:0px;
}

and in your table:

<table style="margin-top:0px; padding-top:0px; border-top:0px;">...

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Where does body{} go? I'm actually using tables because I was trying to avoid CSS because of problems with it rendering properly in Netscape.
 
Either between CSS style tags, or in a separate CSS sheet.

You could use the standard body tag but you'll have to use CSS . I'm surpised Netscape has trouble with it.
Code:
...
<body style="margin-top:0px; padding-top:0px;">
...
</body>
...

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top