467,114 Members | 1,220 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,114 developers. It's quick & easy.

Margins in the body tag

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
  • viewed: 6138
Share:
2 Replies
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
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.

Similar topics

9 posts views Thread by Frances Del Rio | last post: by
reply views Thread by Spartanicus | last post: by
7 posts views Thread by Richard Lawrence | last post: by
8 posts views Thread by Jukka K. Korpela | last post: by
12 posts views Thread by Secret Guy | last post: by
7 posts views Thread by Kyle James Matthews | last post: by
1 post views Thread by drdeadpan | last post: by
11 posts views Thread by listerofsmeg01@hotmail.com | last post: by
4 posts views Thread by =?Utf-8?B?SGVyYg==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.