Forum Moderators: open

Message Too Old, No Replies

Body margin problems

         

Giles Palmer

5:38 pm on Dec 1, 2003 (gmt 0)

10+ Year Member



Hi
I putting a page up in html 4.01 transitional. When I run my validator against the page it says that the following are not alowed in the BODY tag... left margin="0" topmargin="0"

However if I leave them out then I get a margin round the whole page. I have tried to remove the margin using the css...
BODY{margin:0px; padding:0px; position:absolute; top:0px; left:0px;}

This still leaves me with a margin.

I understand that margin attributes in the BODY tag are proprietry so I would like to avoid them even though they actually achieve what I want i.e no margin.

What's the work-around?

Regards

DrDoc

5:41 pm on Dec 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



html, body {
margin: 0;
padding: 0;
}

That should work...

Giles Palmer

6:02 pm on Dec 1, 2003 (gmt 0)

10+ Year Member



Yes this works.

Many thanks for such a quick reply.