Hallo!
Ich bastel gerade eine Internetseite aus Div Containern zusammen. Jetzt habe ich das Problem, dass sich die Parentcontainer nicht an die Childcontainer anpassen. Also, wenn Childcontainer größer wird, sollte auch der Parentcontainer größer werden.
Hier mal mein Code:
CSS:
#Content2 {
position:absolute;
background-color:#a9a9a9;
width: 1314px;
height:auto !important;
height:100%;
min-height:100%;
margin-top:100px;
margin-left:43px;
border-radius:10px;
-moz-border-radius:10px;
}
#Text_Links {
position:absolute;
width:200px;
margin-top:10px;
margin-left:200px;
text-align:center;
background-color:#FFF;
border-radius:10px;
-moz-border-radius:10px;
}
#Text_Content {
position:absolute;
width:700px;
margin-top:10px;
margin-left:420px;
text-align:justify;
background-color:#FFF;
border-radius:10px;
-moz-border-radius:10px;
}
#Hintergrund {
background:#272727;
width: 1400px;
height:auto !important;
height:100%;
min-height:100%;
margin-top: 20px;
margin-left:auto;
margin-right:auto;
border-radius:10px;
-moz-border-radius:10px;
}
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="CSS/style.css" type="text/css" media="all" rel="stylesheet" />
<title>TITEL</title>
</head>
<body>
<div id="Hintergrund">
<div id="Content2">
<div id="Text_Links"> gggg </div>
<div id="Text_Content">
<p align="center">
TEXT </p>
</div>
</div>
</div>
</body>
</html>
Die Textcontainer passen sich wunderbar an ihren Inhalt an. Aber ich will eben auch, dass sich #Hintergrund an #Content2 und dieser sich wiederum an #Text-Content anpasst. Versteht Ihr was ich meine? Ich hab das auch schonmal hinbekommen, glaub ich, aber jetzt funktioniert da nichts...
Gruß