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

position:fixed

Status
Not open for further replies.

crazyboybert

Programmer
Jun 27, 2001
798
GB
HI all,

I need to position elements absolute on the page and prevent them from scrolling when the page is scrolled. The elements in question are all divs which are being positioned at the moment using

#divid{position:absolute; left:20px; top:50px;}

i have tried using position:fixed and am getting some very odd results.

most info i have found seems to indicate it should work. Does anyone have any experience using position:fixed and know what i need to do to get it working or wether there is another css property which can prevent an element from scrolling.

I am using IE6 to develop but will need version 4+ support for ns and ie when going live.

cheers for any help

rob
 
I don't have experience with IE6 / NN6 and also less experience with "position" but have you tried:

position:static;

It's just a thought, or do I say someting verry stupid now ?? :cool:

Erik
 
Hi Erik,

Cheers for the suggestion. This doesnt seem to work either. What i have noticed is that position:fixed works fine in NN6 but not in IE6. Have i finally found something which IE does worse than Netscrap? Surely microsoft cant have overlooked this?

any more suggestions of a cross browser css solution very welcome.

rob
 
Actually if you look into it Netscape 6's CSS/DOM/XML support blows away IE6 in all regards. ===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
Hi Trevman,

I have had a little look into it and you are right NN6 does blow away IE6 in respect to css/dom/xml support. Such a shame they have left so many basic html bugs like the whitespace under images and overflow:auto issues.

maybe one day...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top