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

Overflow Auto and Absolute Positioning

Status
Not open for further replies.

booeyOH

Programmer
May 30, 2007
48
US
Hello,
I am having a rather frustrating problem. It seems that absolute positioning in IE7 is getting messed up if the element is inside a div container with overflow:auto.

For example look at the following:

<center>
<div id="centerdiv" style="overflow:auto;width:50%;border: 1px solid #000000;">

<div id="insidediv" style="position:absolute;background:green;left:0;top:0;">Container has overflow:auto</div>
&nbsp;
</div>


<center>
<div id="centerdiv" style="width:50%;border: 1px solid #000000;">

<div id="insidediv" style="position:absolute;background:green;left:0;top:0;">Container does not have overflow:auto</div>
&nbsp;
</div>
</center>

Any ideas?
 
What is the symptom? What do you see? Can you give more detail? Does the problem go away if you remove the "center" tag? Does your HTML & CSS validate? Do you have a complete and valid DOCTYPE?

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
If you cut and paste the HTML code, open it in FF and IE, you can see the "problem". I will post it in the other forum also.
 
I removed all center tags, and it still was there
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top