Click here to get back home

Netscape margin attributes

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Netscape margin attributes silverbob 06-02-2006
Posted by silverbob on June 2, 2006, 2:47 pm
Please log in for more thread options


I have been writing web pages for years using these attributes to the
body tag:

<body bgcolor=#FFFFFF marginwidth=0 leftmargin=0 marginheight=0
topmargin=0>

I'm now attempting to bring my pages into compliancy with the latest
css based standards. I have removed the bgcolor, leftmargin, and
topmargin attributes in favor of style sheet properties:

BODY {background: #FFFFFF; margin-top: 0px; margin-left: 0px;}

but, what do I do with the Netscape-specific attributes marginwidth and
marginheight? If these are not set somewhere my pages show a small
white margin on the left and top when viewed in Netscape, Mozilla, etc.

- Bob


Posted by Jukka K. Korpela on June 2, 2006, 6:03 pm
Please log in for more thread options



> I have been writing web pages for years using these attributes to the
> body tag:
>
> <body bgcolor=#FFFFFF marginwidth=0 leftmargin=0 marginheight=0
> topmargin=0>

It has always been wrong. The bgcolor attribute's value is malformed (the
syntax requires quotation marks around it), and the other attributes are
proprietary, nonstandard. Besides, setting background color without setting
text and link colors has always been bad practice.

> I'm now attempting to bring my pages into compliancy with the latest
> css based standards. I have removed the bgcolor, leftmargin, and
> topmargin attributes in favor of style sheet properties:
>
> BODY {background: #FFFFFF; margin-top: 0px; margin-left: 0px;}

That's not quite the same thing.

> but, what do I do with the Netscape-specific attributes marginwidth
> and marginheight? If these are not set somewhere my pages show a
> small white margin on the left and top when viewed in Netscape,
> Mozilla, etc.

To remove all margin-like things, set
html, body { margin: 0; padding: 0; }
This is normally not a good idea, though. Margins are generally useful. The
default margins should be increased a little rather than removed.

--
Yucca, http://www.cs.tut.fi/~jkorpela/


Posted by dwight.stegall on June 5, 2006, 5:26 pm
Please log in for more thread options



silverbob wrote:
> I have been writing web pages for years using these attributes to the
> body tag:
>
> <body bgcolor=#FFFFFF marginwidth=0 leftmargin=0 marginheight=0
> topmargin=0>
>
> I'm now attempting to bring my pages into compliancy with the latest
> css based standards. I have removed the bgcolor, leftmargin, and
> topmargin attributes in favor of style sheet properties:
>
> BODY {background: #FFFFFF; margin-top: 0px; margin-left: 0px;}
>
> but, what do I do with the Netscape-specific attributes marginwidth and
> marginheight? If these are not set somewhere my pages show a small
> white margin on the left and top when viewed in Netscape, Mozilla, etc.
>
> - Bob


Do it this way.

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

Leave the body tag empty. Everything you can do in there can be done
better with style sheets.

<body>

best html reference http://www.w3schools.com/html/html_reference.asp
best style sheet reference
http://www.w3schools.com/css/css_reference.asp html links
http://www.websitetips.com/html/ style sheet links
http://www.websitetips.com/css/ html dom
http://www.w3schools.com/htmldom/dom_reference.asp


Similar ThreadsPosted
margin above of

August 23, 2007, 5:15 am
What good is margin-bottom in IE? November 3, 2004, 1:28 pm
Help with Firefox margin issue August 30, 2005, 5:26 pm
strange behavior with IE and margin... June 12, 2006, 2:03 am
after setting 's margin to 0 it is still non zero! (IE only) January 18, 2007, 12:54 pm
margin under floated divs February 14, 2008, 1:06 pm
IE6 -> searching for padding or margin, i don't find it September 29, 2004, 6:40 pm
create margin notes on webpages March 6, 2006, 9:03 pm
Default top and bottom margin disappear in IE7: why November 9, 2007, 11:44 pm
Div left margin getting double size on IE6. Why? May 12, 2008, 1:10 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap