Solved

Page 'margins' in Navigator?

Posted on 2000-03-21
5
217 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

864 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

20 Experts available now in Live!

Get 1:1 Help Now