View Full Version : Layer positioning - IE vs Netscape and Firefox

07-06-2005, 02:58 PM
First off, I apologize if this has been answered on this forum. I have searched it as well as Google for over an hour to try to find someone with a similar problem, to no avail!

My problem is a layer (<div>) position discrepancy between IE and Netscape/Firefox.

<table width="100%" border="0" cellspacing="0" cellpadding="5">
<div id="articletext" style="position:absolute; width:325px; height:252px; z-index:1; overflow: auto; visibility: visible;" class="standardtext"><?php print nl2br($project["Description"]) ?></div>
<img src="/images/spacer.gif" width="5" height="252"></td>

In IE it looks fine. I simply have a layer within a table cell with no left/top positioning. I use it to display scrolling text within a page. In Netscape and Firefox, when you load the page it shows the layer about 15-20 pixels to the right of where it should be. If you refresh the browser it shows the layer positioned correctly. So, I know the browser knows where it SHOULD be, but why doesn't it display it correctly from the start?

Anyone have any ideas?

Matt Tyree

07-06-2005, 03:05 PM
Difficult to say from only that small piece of code but I suspect you may be running into trouble with padding.

This link probably explains it best... Box Model hack (http://tantek.com/CSS/Examples/boxmodelhack.html)


07-06-2005, 03:07 PM
Sorry...I just didn't want to throw a ton of meaningless code up there. Most of it is all php dynamic code anyway.

Would a link to the page itself help? If so:


07-06-2005, 03:47 PM
Hmm now I see what you mean. That's just darn wierd. Let me investigate further :)

07-06-2005, 04:25 PM
So, you tested it in both browsers, eh? It IS friggin' weird! I can't figure it out. I've had trouble with layer positioning in Netscape before. But, it was a constant thing. A refresh didn't help. So, this problem is REALLY throwing me! :)


07-09-2005, 03:45 AM
Any clues as to the cause?

07-09-2005, 06:45 AM
Maybe you fixed it by now. Went to take a look at it, the only browser it looked strange in was netscape 4.8. I tried 8 and 7.2 along with a few other browsers. Only weird thing I saw was the little 1x1 pixel below the flash.

07-09-2005, 01:56 PM

So, for you the layers weren't out of place? It's definitely not fixed yet. Still does it on my end for Netscape 7.1, 7.2, 8 and Firefox. Opera shows it correctly. As for Netscape 4.8...well, I'm not really too concerned about that one. ;)

The 1x1 pixel is also a huge mystery to me. I re-exported that swf 5 times or more trying to correct it. It's not there in Flash. It only shows up when I export the swf. ??????? Finally I just decided to live with it. It was the least of my worries at the time! :D