Search code examples
cssfixedcss-position

How create a div that's position is fixed compatible with IE, FF & Chrome


I have fixed(position) on the left. It has style="overflow: auto" and then the rest of articles go to the right which is scrollable.

Some of options in the sidenav is not visible in IE and FF. I understand that Browser view port are different for different browsers. How can I adjust the height of sidenav so that all options are visible.

I appreciate any help.

Thanks.


Solution

  • See if this helps:

    http://jsbin.com/ixula4

    What I've done is that that I added top: 0; height: 100% to the fixed positioned div along with overflow: auto. Seems to work in FF, Chrome and IE7 (standards-compliance mode). Not sure about other browsers. You better research on "100% height divs" for hacks you can use in other browsers.