W3C home > Mailing lists > Public > www-html@w3.org > April 2002

Re: Removing margins with CSS

From: Nigel Peck <Nigel.Peck@itm-solutions.co.uk>
Date: Fri, 19 Apr 2002 13:50:26 +0100
Message-Id: <scc020aa.025@itm-solutions.co.uk>
To: <www-html@w3.org>
I disagree with html being the root "canvas" element, as body is the
element which contains the elements to be displayed on the canvas. The
head is not for display in the canvas and html contains head and
body.(imho)

Thanks for the help though :-)

Thanks
Nigel

>>> Alexander Savenkov <w3@hotbox.ru> 04/19/02 12:08pm >>>
Hello everyone, Nigel,

> Please could someone tell me the correct way to remove the margin
from
> a page using CSS.

> I am currently using;

> BODY    {margin: 0 px;}

> which works for IE but not NS.

> P.S. I have also tried {padding: 0 px;}

  First of all, it is incorrect to use BODY to set the margins of
  a pages because the root canvas is HTML.
  Using BODY works in IE because it's a possible bug (imho).
  So, as Jonas suggested, try to use this:
  html, body { margin: 0px }

  Secondly, it'd be better if you have indicated the browser
  version you use.

  I doubt if there's a person who haven't tried to solve the issue.
  I was browsing thru the archives of this list for hours, but failed
  to find a solution. There were two types of suggestions:
  1. Use the HTML code which won't validate:
     <body topmargin="0" leftmargin="0" marginwidth="0"
     marginheight="0">
  2. Forget about Netscape, because it's old, ugly, etc.

Best regards.
---
  Alexander "Croll" Savenkov         http://www.thecroll.com/ 
  w3@hotbox.ru                            http://croll.da.ru/ 



ITM Business Solutions
Unit 4
Nine Trees Trading Estate
Morthen Road
Rotherham
S66 9JG

Reception
Tel: 01709 703288
Fax: 01709 701549

Help Desk
Tel:01709 530424
Fax: 01709 702159

CONFIDENTIALITY NOTICE: This message is intended only for the use of
the individual or entity to which it is addressed, and may contain
information that is privileged, confidential and exempt from disclosure
under applicable law.
Received on Friday, 19 April 2002 08:50:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:51 GMT