cancel
Showing results for 
Search instead for 
Did you mean: 

Why is the attribute "leftmargin" in the HTML body tag ignored by Firefox?

SOLVED
Highlighted
New Contributor

Why is the attribute "leftmargin" in the HTML body tag ignored by Firefox?

Check f.i. http://www.vaartips.nl/tipa.htm and see the difference (left margin) between FF and IE. De "leftmargin 20" is ignored (not working) in FF (see code of the page)

1 ACCEPTED SOLUTION

Accepted Solutions
Site Moderator

Re: Why is the attribute "leftmargin" in the HTML body tag ignored by Firefox?

hello, <body leftmargin="20"> is not html-compliant souce code.

you could add body { margin-left:20px } in the css-style section instead...

<head>
<style type="text/css">
body { margin-left:20px }
...
</style>
</head>

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.vaartips.nl%2Ftipa.htm&charset=%28detect+automati...

3 REPLIES
Site Moderator

Re: Why is the attribute "leftmargin" in the HTML body tag ignored by Firefox?

hello, <body leftmargin="20"> is not html-compliant souce code.

you could add body { margin-left:20px } in the css-style section instead...

<head>
<style type="text/css">
body { margin-left:20px }
...
</style>
</head>

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.vaartips.nl%2Ftipa.htm&charset=%28detect+automati...

Site Moderator

Re: Why is the attribute "leftmargin" in the HTML body tag ignored by Firefox?

See also https://developer.mozilla.org/en-US/docs/Mozilla_Quirks_Mode_Behavior

The topmargin, bottommargin, leftmargin, and rightmargin attributes on BODY are supported only in quirks mode (bug 9258).

New Contributor

Re: Why is the attribute "leftmargin" in the HTML body tag ignored by Firefox?

Problem is solved. Thank you!