malibujamba Posted February 16, 2008 Share Posted February 16, 2008 Hello,I would like to automaticly stretch this div to the heigth of the text. I thougt 100% would do the tricky but I was wrong. Any one can put me on the right track?example(edit: it's about the div named 'content')here is the css: #container{ position: relative; margin: 0; padding: 0; margin: 0 auto 0 auto; width: 750px; height: 1770px; background-color: #735C41;}#header{ position: absolute; margin-top: 10px; margin-left: 10px; width: 730px; height: 190px; background-color: #302215;}#header img { border-style: none;}#content{ position: absolute; margin-top: 210px; margin-left: 10px; width: 460px; height: 1400px; background-color: #302215;}#subcontent{ position: absolute; margin-top: 210px; margin-left: 480px; width: 260px; height: 400px; background-color: #302215;}#subcontent img{ border-style: none; margin-left: 5px; margin-top: 5px;}#subcontent a { color: #FFF0A5; font-style: normal;}#menu{ margin-left: 10px;}#footer{ position: absolute; margin-top: 1620px; margin-left: 10px; width: 730px; height: 140px; background-color: #302215;} Link to comment Share on other sites More sharing options...
AElliott Posted February 16, 2008 Share Posted February 16, 2008 More changes would have to be made, the CSS is just not built to expand properly. You would want to remove all of the absolute positioning and do something a bit more like this (NOTE: untested in multiple browsers, only Firefox): #container{ margin: 0; padding: 0 0 10px 0; margin: 0 auto 0 auto; width: 750px; background-color: #735C41;}#header{ margin-top: 10px; margin-left: 10px; width: 730px; height: 190px; background-color: #302215;}#header img { border-style: none;}#content{ margin: 10px; float: left; width: 460px; background-color: #302215;}#subcontent{ margin-top: 10px; margin-left: 480px; width: 260px; background-color: #302215;}#subcontent img{ border-style: none; margin-left: 5px; margin-top: 5px;}#subcontent a { color: #FFF0A5; font-style: normal;}#menu{ margin-left: 10px;}#footer{ clear: both; margin: 10px; padding: 20px; background-color: #302215;} Link to comment Share on other sites More sharing options...
malibujamba Posted February 23, 2008 Author Share Posted February 23, 2008 I just replaced your css code for mine. as you can see it did the trick:)It's not perfect yet but the idea is there. Later I will try to figure it out better and make it look as it should:)thnx for helping, Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.