By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,648 Members | 1,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,648 IT Pros & Developers. It's quick & easy.

Margins in the body tag

P: n/a
Hi,

I've been using the BODY tag with leftmargin="0" topmargin="0" etc etc.

W3c validator tells me this is not right....

What is the correct way to push the content right to the top left?

Any suggestions gratefully received!

-Alec
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Peter Wranger wrote:
Hi,

I've been using the BODY tag with leftmargin="0" topmargin="0" etc etc.

W3c validator tells me this is not right....

What is the correct way to push the content right to the top left?


With CSS.

body { margin: 0; }

--
Mark.
Jul 20 '05 #2

P: n/a
On Wed, 19 May 2004 11:15:58 +0100, Mark Tranchant
<ma**@tranchant.plus.com> wrote:
Peter Wranger wrote:
Hi,
I've been using the BODY tag with leftmargin="0" topmargin="0" etc etc.
W3c validator tells me this is not right....
What is the correct way to push the content right to the top left?


With CSS.

body { margin: 0; }


Nope, it is:

body { margin: 0; padding: 0;}

This will work in IE4+, Opera 3.5+, Netscape 6.0+, all Mozilla/Firefox,
all Safari etc.

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.