Solved

Page 'margins' in Navigator?

Posted on 2000-03-21
5
219 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
ID: 2640623
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
ID: 2640966
Try using:
marginwidth="0" marginheight="0"
in the body tag.

-josh
0
 
LVL 32

Expert Comment

by:Batalf
ID: 2641308
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
ID: 2643615
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
ID: 2643817
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Removing HTML elements using javascript 4 46
Width of Page is Affecting Side Menu 6 26
HTML5 Get data in table rows 5 29
Call a function within the ASP code 4 12
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

823 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