Jump to content
xisto Community
Sign in to follow this  
realthor

Ie6 Relative Positioning Bug how to avoid

Recommended Posts

i have the following definition in my style and i'd like all elements in site to be relatively positioned against their parents so i can position any of them absolute when i need to:

{	 margin:0; padding:0; 		  font-family:verdana,arial,sans-serif;	 font-size:11px;	 text-align:left;	 background:none;	 color:black;	 position:relative;	}

All good in opera9 and FF2beta but IE6 stills the page without the possibility of scrolling it down.
Any ideas?

Share this post


Link to post
Share on other sites

Position:relative is the default positioning and should not have to be declared there.
Also, Absolute positioning is a problem child in many situations. Best to avoid it unless absolutely required (pun intended) for the purpose.
Having said that, I would be tempted to remove the position:relative from the Universal selector and declare it on the direct ancestor to affect the elements you want positioned absolutley. And any descendants should be reset to position:relative.
Might work.

*edit*
I knew I had a link...

http://www.positioniseverything.net/abs_relbugs.html

And also, check the CSS Creator site for their discussion about 'haslayout'. Simply stated, trigger the 'haslayout' condition using their hack. Typically, add a height to the Parent contiainer, but read about it first, there might be something else that would work better for you. Since you haven't posted a particular example, it is difficult to say for sure which trigger you should use to set 'haslayout'.

See also: http://www.satzansatz.de/cssd/onhavinglayout.html

Edited by jlhaslip (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.