Absolute DIV not showing in IE6 / IE7 - Internet Explorer
Iv come across this problem a few times now and this should be of help to a few people.
When placing an absolute div within a relative positioned div, in IE6 and IE7 that div disappeared. The content within the div and the div just would not show. An immediate response would be to think of the stack and z-Index but after a few tests it wasnt that.
The Fix: Simply surround the absolute div with another empty div.
Did it work? Another similar problem? Leave a comment.
Next entry: 3 CSS tricks / bugs in Internet Explorer 7
Previous entry: Jeremy Keith talks web accessibility and html5
This solved my problem. Thanks a lot! Any idea why an extra div is needed?
Thanks a bunch for this. You saved me a lot more wasted time. I waste more time finding IE workarounds.
Wow I can’t believe that was so simple to fix! Thanks a lot, you saved me ripping my hair out for the next 6 hours
This helped me as well, it worked ! Thanks for posting.
THANKS!
You just answered a question I had been working on for DAYS! THANKYOU!!!
It did not work for me, can you give me advice?
This is what i did and it did not work.
<div>
<div id=“buttontop1”></div>
</div>
Here is the info:
The header.php code:
<!—Begin Custom Header Buttons and phone—>
<div id=“buttontop1”></div>
<div id=“buttontop2”> </div>
<!—end Custom Header Buttons and phone—>
The CSS code :
#buttontop1{
position: absolute;
z-index: 99;
height: 74px;
width: 206px;
top: 86px;
right: 13px;
}
#buttontop2 {
position: absolute;
z-index: 100;
height: 74px;
width: 214px;
top: 86px;
right: 228px;
}
#tel {
position: absolute;
z-index: 10;
top: 18px;
right: 0px;
color: #FFF;
width: 400px;
height: 50px;
font: bold 50px/normal Arial, Helvetica, sans-serif;
}
IT WORKS! THANKS! :D
BRILLIANT, brilliant, brilliant—Thank you very much
Wow!! Wasted an hour on this! THANKS—
Works. No idea why.
Thanks. Much.
Awesome!!!!
Spent HOURS!!!! Bless you!
So grateful for this. Stupid IE…
Thank you for saving me! This was exactly what I needed
Thank you so much! It work very well.
Simply great solution , i wasted lots of time found nothing solid , it worked magically. Thanks , thank you so much, fan of genius…..
Hey, well done, this solution works for me too. Cheers mate!