Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Rid of Body Margins in Opera and Netscape

Status
Not open for further replies.

NeckBone

Programmer
Oct 15, 2003
47
US
Would some kind soul please tell me how to eliminate the margins/padding that Opera and older Netscape browsers put around a document?

Thanks and Happy New Year!

For every problem, there's a solution and every solution brings it's own set of problems.
 
I haven't got the two browsers in question at this PC. But you can try adding this style in the head section:

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

or this style definition directly in the body tag:

Code:
<body style="margin : 0px;">

I recon it should work for you! Remember to specify the doctype!!

Regards


Jakob
 
<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>

that will work for older browsers...

Known is handfull, Unknown is worldfull
 
<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>

thanks vb,

That's what I've always used and it works.

I was looking for a scripting way to set margins that would be compatible for old and new browsers to set the margin. CSS doesn't work for older browsers.

Do you know how to set a <td> width with javascript?


For every problem, there's a solution and every solution brings it's own set of problems.
 
AFAIK you can't set the width of anything w/o using CSS properties (that's what you can access alter with JS).

Regards


Jakob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top