Problem med div og tilpasning til indhold
HejJeg har nedenstående kode. Mit problem består i, at når jeg laver noget indhold i div'en content, som fylder mere end div'en wrapper er høj, så skal wrapper tilpasse dig således at alt indholdet kan være i den, og baggrunden også følger med.
*****************************************
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da" lang="da">
<head>
<title>Priku - [*pagetitle*]</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
<style type="text/css">
body {
font-size:12px;
font-family:'arial','tahoma','times New Roman',serif;
background-image:url( images/bg2.gif);
background-position:top;
background-attachment:fixed;
margin-top:0px;
margin-bottom:0px;
}
#wrapper {
background-image:url(images/contentbg2.gif);
background-position:top;
background-repeat:repeat-y;
width:900px;
left:50%;
margin-left:-450px;
top:0px;
position:absolute;
height:600px;
min-height:600px;
padding-bottom:30px;
}
#top {
background-image:url( images/topbg.gif);
background-position:top;
background-repeat:no-repeat;
width:900px;
height:20px;
}
#complogo {
text-align:right;
left:70px;
top:45px;
position:absolute;
}
#mainmenu {
text-align:left;
left:55px;
top:90px;
font-size:11px;
width:130px;
position:absolute;
line-height:20px;
list-style-image:url(images/menudot.gif);
}
#submenu {
text-align:left;
left:55px;
top:200px;
font-size:11px;
width:130px;
position:absolute;
line-height:20px;
list-style-image:url(images/submenudot.gif);
}
#content {
overflow:hidden;
left:290px;
top:215px;
width:520px;
line-height:18px;
position:absolute;
}
#headline {
font-size:16px;
font-weight:bold;
overflow:hidden;
left:290px;
top:185px;
width:520px;
position:absolute;
}
#contactbox {
left:73px;
top:100%;
margin-top:-130px;
font-size:11px;
width:130px;
position:absolute;
}
#kuvert {
left:650px;
top:9px;
position:absolute;
}
#bottom {
background-image:url( images/bottombg.gif);
background-position:top;
background-repeat:no-repeat;
width:900px;
height:20px;
top:100%;
margin-top:-20px;
position:absolute;
}
p {
margin-bottom:0px;
margin-top:0px;
}
a:active {
text-decoration:none;
color:#C80000;
}
a:hover {
text-decoration:underline;
color:#C80000;
}
menu.a:link, a:visited {
text-decoration:none;
color:#000000;
}
menu.a:visited {
text-decoration:none;
color:#000000;
}
#beta {
left:50%;
top:50%;
margin-top:-117px;
margin-left:-175px;
position:absolute;
}
</style>
</head>
<body>
<div id="wrapper">
<img src="images/beta.gif" width="350" height="234" alt="" id="beta" />
<div id="top"></div>
<img src="images/logo.gif" width="120" height="22" alt="" id="complogo" />
<img src="images/kuvert2.jpg" width="150" height="101" alt="" id="kuvert" />
<div id="mainmenu" class="menu">
[!Wayfinder?&startId=`0`&level=1!]
</div>
<div id="submenu" class="menu">
[!Wayfinder?&startId=`[[UltimateParent]]`&level=2!]
</div>
<div id="headline">[*longtitle*]</div>
<div id="content">[*content*]</div>
<div id="contactbox"></div>
<div id="bottom"></div>
</div>
</body>
</html>
*****************************************