• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

div zu hoch

htmlvisitor

Neues Mitglied
Hallo

Im IE6 ist das div (rot) höher als die definierten 500px.
Wie lässt sich das korrigieren?

Patrick

Code:

<body style="margin-top: 0px">
<div style="background-color: #CCFFFF; width: 960px; height: 900px; margin-left: auto; margin-right: auto; margin-top: 0px">
<div style="width: 960px; background-color:blue; height:500px;">
<div style="width: 960px; height: 5px; background-color: #FFFFCC; font-size: 0px">
</div>
<div style="width: 960px; height: 62px; background-color: #CC99FF">
</div>
<div style="position: relative; width: 489px; height: 318px; z-index: 1; left: -21px; top: 52px; background-color: #ffffff; border: 1px solid #5D5D5D;">
</div>
<div style="position: relative; width: 489px; height: 318px; z-index: 2; left: 490px; top: -223px; background-color: #ffffff; border: 1px solid #5D5D5D;">
</div>
</div>
</div>
 
nun sind es die neuen . . .

Hallo und vielen Dank.

Mit IE6 ist es ok.
Die neue Generation (IE8, Firefox 3.x, usw) schneidet nun (overflow hidden) alles ab, was aus dem blauen div herausragt.
Links und rechts sollten in diesem Fall folgende beiden div layers heraus schauen, diese sind im besprochenen div drin:

<div style="position: relative; width: 489px; height: 318px; z-index: 1; left: -21px; top: 52px; background-color: #ffffff; border: 1px solid #5D5D5D; overflow:visible">
</div>
<div style="position: relative; width: 489px; height: 318px; z-index: 2; left: 490px; top: -223px; background-color: #ffffff; border: 1px solid #5D5D5D;overflow:visible">
</div>

Ich kann die blaue Fläche leider nicht breiter machen, weil es im produktiven Layout sonst Probleme mit Hintergund-Bildern gibt.

Patrick
 
Mit IE6 ist es ok.
Die neue Generation (IE8, Firefox 3.x, usw) schneidet nun (overflow hidden) alles ab, was aus dem blauen div herausragt.
Den Hack dürfen konforme Browser natürlich nicht sehen.
Darum der Sternchen-Hack:
Code:
[COLOR="DarkRed"][B]* html [/B][/COLOR].expanding {
overflow: hidden;
}

Nur IE5(win)-IE6 sind von diesem Bug betroffen.
 
Sorry...

oh Verzeihung, ich hatte den overflow unglücklich in einen style="..." eingebaut.

Jetzt hab ich kapiert :-)

Patrick
 
Zurück
Oben