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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange Frames TopMargin with IE problem --

Status
Not open for further replies.

link9

Programmer
Nov 28, 2000
3,387
US
Hello all --

I am having an IE5 problem -- I have been handed a look and feel layout that I am trying to work with. The layout is three frames -- a top, a bottom, and a main --

Sometimes, the top frame shows with about a ten pixel topmargin in IE5.0 --

IE5.5 displays perfectly (no margin)

<body topmargin=0 leftmargin=0 bottommargin=0 rightmargin=0 marginwidth=0 marginheight=0>

is what the body tag looks like --

The real kicker is that the frame content changes from location to location, and another page with exactly the same body tag displays perfectly -- same browser, same machine...

I (We) are truly stumped on this one, and I'm hoping/praying that someone out there has had the same problem before and figured out a way to fix it.

Thanks! :)
Paul Prewett
penny.gif
penny.gif
 
have you tried setting margin height and width in the frames page of the document ?? I think the syntax is something like

<FRAME
BORDERCOLOR=&quot;color&quot;
FRAMEBORDER=&quot;YES&quot;|&quot;NO&quot;
MARGINHEIGHT=&quot;marginHeight&quot;
MARGINWIDTH=&quot;marginWidth&quot;
NAME=&quot;frameName&quot;
NORESIZE
SCROLLING=&quot;YES&quot;|&quot;NO&quot;|&quot;AUTO&quot;
SRC=&quot;URL&quot;
>

hope this helps
 
Hi Paul,

I thought that marginwidth and marginheight are [bold]NOT[/bold] BODY-attributes, but only FRAME-attributes.
I also thought that the browser looks for himself to set an value if you don't set it and that the minimum value = &quot;1&quot;.

Further I don't have experience with it, but check if you don't have set a value for the framespacing-attribute in the FRAME or FRAMESET tag.

So try some things out with setting or just leaving some attributes.

Erik
 
Check with But I don't believe the all the margin attributes are in the standard of html 4.0 ,, and if they aren't some browsers will read them and some others wont.
If you validate all your html, your page will look the same on every browser.
 
Marginheight and marginwidth are Netscape 4.x specific...

Paul-
Can you post the code for your frameset? This seems to be working fine for me in IE 5.
One thing you could try is setting the margin with css...

body {
margin: 0px;
}

That code will set all the margins to 0 in IE (and NN6+).
 
Don't refer to the standards for framesets - both netscape nor IE do their own thing on this one. You are right to use the margin attributes in the body tag of the displaying pages.

I would use:

frameset frameborder=&quot;0&quot; border=&quot;0&quot; framespacing=&quot;0&quot; frameborder=&quot;no&quot;

and in the frame tag,

frame framespacing=&quot;0&quot; frameborder=&quot;no&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot;

there are two frameborders just to make sure, as IE uses 0 and Netscape uses yes|no

Netscape will probably give you a bit more grief than IE.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top