Hej
Jeg har en container, som indeholder nogle divs
et af disse er et div, som indeholde to bokse.
Jeg vil gerne, at det bagerste div "Main_content" tilpasses i højden, hvis indholdet i en af de øvrige divs "#left_content" bliver længere, således denne "baggrund" følger med, kan det lade sig gøre?
Min html
- <body background="bg.jpg">
- <div class="container">Content for class "container" Goes Here
- <div id="logo"> </div>
- <div id="menuen">Content for id "menuen" Goes Here</div>
- <div id="nav_info">Content for id "nav_info" Goes Here</div>
- <div class="main_content">Content for id "main_content" Goes Here</div>
- <div id="left_content">
- <p>Content for id "left_content" Goes Here</p>
- <p> </p>
- <p> </p>
- <p> </p>
- <p> </p>
- <p> </p>
- <p> </p>
- <p> </p>
- <p> </p>
- <p> </p>
- </div>
- <div id="right_content_box_2">Content for id "right_content_box_2" Goes Here</div>
-
- </div>
- </body>
Min css
- @charset "UTF-8";
- .container {
- height: 1200px;
- width: 960px;
- clear: none;
- position: absolute;
-
- margin-top: 0px;
- left: 50%;
- margin-left: -480px;
-
-
- }
- #logo {
- position: absolute;
- height: 82px;
- width: 482px;
- top: 0px;
- left: 0px;
- background-image: url(logo.png);
- }
- .menu {
- padding: 0px;
- float: left;
- height: 33px;
- width: 479px;
- }
-
-
- #menuen {
- position: absolute;
- left: 482px;
- background-image: url(menu.png);
- top: 0px;
- height: 33px;
- width: 480px;
-
- }
- #nav_info {
- top: 83px;
- left: 0px;
- position: absolute;
- height: 71px;
- width: 482px;
-
- }
- .main_content {
- height: 600px;
- width: 960px;
- top: 154px;
- position: absolute;
- left: 0px;
- background-color: #FFF;
- -moz-border-radius-bottomright: 15px;
- border-bottom-right-radius: 15px;
- -moz-border-radius-bottomleft: 15px;
- border-bottom-left-radius: 15px;
- -moz-border-radius-topright: 15px;
- border-top-right-radius: 15px;
- -moz-border-radius-topleftt: 15px;
- border-top-left-radius: 15px;
- }
- #left_content {
- height: 321px;
- width: 424px;
- top: 215px;
- background-color: #03C;
- z-index: 3000;
- position: absolute;
- left: 26px;
- overflow: auto;
- }
- #right_content_box_2 {
- background-color: #9F0;
- position: absolute;
- height: 159px;
- width: 455px;
- left: 482px;
- top: 380px;
- -moz-border-radius-topright: 15px;
- border-top-right-radius: 15px;
- -moz-border-radius-topleftt: 15px;
- border-top-left-radius: 15px;
- }