Solved

Page 'margins' in Navigator?

Posted on 2000-03-21
5
216 Views
Last Modified: 2010-04-09
I'm sure this is something reasonably simple, but I've been tearing my hair out.
Since using frames forever I'm redesigning an entire site without them, and I cannot for the life of me get my tables to sit right against edge of the browser window in Netscape. It seems to place a margin all the way around the page.
I can see the same thing happening in IE, but it's only 1 pixel so it's fine.

The problem is that I have javascript elements which are positioned using X and Y coordinates, so they are in the right place, but all the other page elements are offeset by this l;arge border around the page.

I know the topmargin and leftmargin <body> attributes aren't recognised by Navigator, so what do I do?
0
Comment
Question by:REMarlow
5 Comments
 

Expert Comment

by:Deathead
Comment Utility
use javascript to see if the browser is netscape and reposition the elements accordingly, it may take a little time to get the right pixils but once you have that the rest should be a cinch
X.Deathead
0
 
LVL 8

Accepted Solution

by:
jbirk earned 50 total points
Comment Utility
Try using:
marginwidth="0" marginheight="0"
in the body tag.

-josh
0
 
LVL 32

Expert Comment

by:Batalf
Comment Utility
Or make your self a stylesheet :

<style type="text/css" media="screen">
               body {margin-left:0pt;margin-top:0pt}>

between the <header> and </header> tag.

Batalf

0
 
LVL 1

Expert Comment

by:cybernietic
Comment Utility
It's not possible to suppress the margins with netscape 3.  You will alway have a top margin of 15 pixels and a left margin of 10 pixels.

In netscape 4 you can suppress the margin with the tag
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
0
 

Author Comment

by:REMarlow
Comment Utility
Wow thanks everyone :)
Deathead's suggestion was more damage control than anything, and I didn't want to resort to that if I didn't have to, but cheers anyway.

The marginwidth and marginheight attributes did the trick, cheers Josh (oh and thanks for the explanation cybernietic -  fortunately I'm not really bothered about compatibility with Navigator 3).

And thanks Batalf for suggesting the style sheet commands, I'm using an external style sheet so I'll probably stick those in there and do some experimenting to compare it with the <body> attributes suggested by Josh, although I expect it yields exactly the same results doesn't it?

Thanks again,
Robin
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now