Steevie
Threadersteller
Dabei seit: 10.08.2007
Ort: -
Alter: 35
Geschlecht:
|
Verfasst Mo 13.02.2012 14:23
Titel 2 Divs in einem Overflow Div |
|
|
Hi, folgendes Problem:
Ich habe einen Div "content" in dem sich zwei weitere Divs befinden "text" und "inhalt"
jetzt möchte ich, dass sich der "content" immer der größe anpasst (mit overflow)
Allerdings wird nur der erste Div beachtet (also wenn in "inhalt" mehr steht als in "text" passt sich der "content" nur dem "inhalt" an)
wie stelle ich es jetzt an, dass beide beachtet werden?
Code: | #content{
width:900px;
overflow:auto;
background-image: url(pictures/white.png);
margin: 0px auto;
position: relative; top:50px;
padding-top:0px;
z-index:0;
}
#inhalt{
width:400px;
border-style:solid;
background-color:black;
margin-left:20px;
padding:5px;
overflow:auto;
}
#text{
position:absolute; top:10px; right:10px;
width:400px;
overflow: auto;
border-style:none;
margin-right:20px;
padding:5px;
} |
Code: | <div id="content">
<div id="inhalt">
Inhalt
</div>
<div id="text">
Text
</div>
</div> |
|
|