View Full Version : when I resize my window, My fixed content menu moves

10-18-2007, 10:09 PM
I have used the method specidied on this site to create a fixed content using CSS. when I scroll up and down the menu is fixed. however when I resize my window from the right or the left, my fixed content menu moves and ends up floating on my table blocking the table contents. I noticed that the fixed content menu on the tutorial page on this site does not move when I resized the window. what is the trick?
I even included the code for IE but no use. I am using Mozilla firefox
can you please help me? I have pasted the code I am using.

<style type="text/css">

position: fixed;
left: 240px;
top: 340px;
#mydiv{ /*IE6 only rule, applied on top of the default above*/
position: absolute;
top: expression(document.compatMode=="CSS1Compat"? document.documentElement.scrollTop+50+"px" : body.scrollTop+50+"px");
left: expression(document.compatMode=="CSS1Compat"? document.documentElement.scrollLeft+10+"px" : body.scrollLeft+10+"px");

<div id="mydiv">
my table goes here

10-19-2007, 09:29 AM
Do you have a width set on anything?
Or are you clearing the div's?

Those are two things I'd be checking for if I was to see the entire code. (hint)

10-19-2007, 03:52 PM
Sometimes better to size things in percentages instead of pixels etc.