Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2669
I've been thanked 63 times.
Offline
Roxane wrote:
allan16 wrote:
How can I create a table that goes all the way to the top of the page. Like the one on this site. that image is at the very top of the page.
ThanksWhether using tables or divs, to get anything exactly at the top of he page you need to specify that the page margin is "0". By default there are a few pixels of margin, so if you have the following css...
Code: css
body{
margin-top: 0px;
}
....things will display exactly at the top of the page, and there is no need for absolute positioning.
How did it take 20 posts before the correct answer was submitted?
- thank you Roxane!!!
Internet Marketing Books
Promote Yourself on Site Reference!
Moderator
From: Deland, FL
Registered: 2005-10-25
Posts: 1271
I've been thanked 20 times.
Offline
She beat me to it....
To have content butt-up against the edge of the top, the CSS code would look like that:
Code: CSS
#style {
margin-top: 0px;
}
If you want it all the way at the top and all the way left:
Code: CSS
#style {
margin-top: 0px;
margin-left: 0px;
}
That's how I do it anyways, I'm sure there are other ways to make it work.
| Never |


