View Full Version : Topmargin?


tabs
12-02-2005, 10:56 PM
Hey guys, I wanted my whole site to stick on the top of the screen, i did it using topmargin=0 with IE, it works, but when i try it with Firefox, it has some spacing, can anybody tell me which is the right code to put so it will work on both browsers an hopefully will be HTML validated? Thanks!

harmor
12-02-2005, 11:03 PM
Play with this
http://www.w3schools.com/css/tryit.asp?filename=trycss_margin-top

pb&j
12-02-2005, 11:06 PM
if you place this in the HEAD of your page coding, it should clear up that space...

<style type="text/css">
body {margin: 0px; padding: 0px;}
</style>

that will affect all 4 sides. if you want just the top...

<style type="text/css">
body {margin-top: 0px; padding-top: 0px;}
</style>

tabs
12-02-2005, 11:09 PM
Hello, what if I wanted the whole table to be on top?

pb&j
12-02-2005, 11:13 PM
the buffer space you saw in firefox was on the "body" of the webpage. using the coding i provided should fix the problem.

if you have a related problem, please post a link to your page in action.

if you have a new problem, please create a new thread and explain fully, plus a link would help there too.

tabs
12-02-2005, 11:13 PM
pb&j, thank you so much, will try it out.

tabs
12-02-2005, 11:14 PM
Okay, thank you, sorry but I didnt upload it yet since im still working on it, will try to post a link and be clearer next time. Thanks again.

pb&j
12-02-2005, 11:17 PM
ok.
hope it goes well for ya.