position:fixed not working in forefox

They have: 7 posts

Joined: Jan 2009

Hi everyone.

I am using firefox, and for some reason position:fixed is not working. I get a pop-up pane, but it scrolls. the bizarre thing is that websites with very simple position:fixed code ARE actually working and not scrolling the required stuff, in the same browser.

I can't tell why it isn't working.

The code for the popup pane is located inside a table. I know that's a strange place to put it considering that I want its position fixed with respect to the whole page but could that be an issue? But I tried putting it at the top of my and it still isn't working.

The pane does happen to be inside an iframe, could that be an issue?

Also the style is inline. Here is the code anyway...

<div id="viewEditPane" name="viewEditPane" style="position:fixed; z-index:10; visibility:hidden; top:100px; left:50px;">
<table  background="mpSitePics/beige-marble-2.jpg" id="viewEditTable" name="viewEditTable" width="400px" style=" border-style:solid; border-width:2px; border-color:black;">
<tr><td id="vetd" name="vetd" height="400px" >View Edit Pane</td></tr>
<tr><td><input type="button" value="Close" onClick="document.getElementById('viewEditPane').style.visibility='hidden';"></td></tr>
</table>
</div>

They have: 7 posts

Joined: Jan 2009

Just to make it easier to see, here is the div's tage with inline style:

<div id="viewEditPane" name="viewEditPane" style="position:fixed; z-index:10; visibility:hidden; top:100px; left:50px;">

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

scorpius420 wrote:
The pane does happen to be inside an iframe, could that be an issue?

Hi scorpius,

An iframe is treated as a separate window within the parent window - so the position will only be fixed within the document inside the iframe.

Try to avoid iframes and frames in general unless they are necessary - you can achieve much of the same function using a div with overflow: auto or try a modal window (prototype.js/window.js etc)

now about yer tables... Confused

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.