Forums
This topic is locked
auto-stretch the text body height
Posted 02 May 2008 23:35:45
1
has voted
02 May 2008 23:35:45 Josh lindem posted:
I'm having the worst time trying to get this to work with DIV & CSS. Normally I could mess around with tables and do this, but I'm trying to force myself to stop using such an ugly method for building web pages.Could someone help show me how to get it so that when I enter more text into the text body it will auto stretch the text area? I know it's got to be something simple I'm over looking.
<pre id=code><font face=courier size=2 id=code> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-image: url();
background-repeat: no-repeat;
background-color: #2A5F00;
}
#Layer1 {
position:absolute;
left:56px;
top:25px;
width:800px;
height:173px;
z-index:1;
background-color: #010000;
background-image: url(images/Untitled-1.jpg);
}
#Layer2 {
position:absolute;
left:57px;
top:187px;
width:170px;
height:491px;
z-index:2;
background-color: #EEEAD1;
}
#Layer3 {
position:absolute;
left:226px;
top:157px;
width:650px;
height:auto;
z-index:3;
background-color: #FFFFFF;
}
#Layer4 {
position:absolute;
left:55px;
top:22px;
width:180px;
height:198px;
z-index:4;
background-image: url(images/Golfer1_Finished.jpg);
}
.textbody {
text-indent: 15px;
overflow: visible;
bottom: 5px;
text-align: left;
height: auto;
}
#Layer6 {
position:absolute;
left:246px;
top:150px;
width:409px;
height:22px;
z-index:5;
}
#Layer7 {
position:absolute;
left:669px;
top:150px;
width:202px;
height:22px;
z-index:6;
}
.style1 {font-size: 12px}
.style2 {
font-size: 24px;
font-weight: bold;
font-style: italic;
color: #2A5F00;
}
-->
</style>
<script type="text/javascript" src="vwd_scripts/curvy/vwd_curvycorners.js"></script>
<script type="text/javascript">
<!--
gCurvyCorners[0]="Layer1,10,10,10,10,0,0";
gCurvyCorners[1]="Layer3,10,10,10,10,0,0";
gCurvyCorners[2]="Layer2,10,1,10,1,0,0";
//-->
</script>
</head>
<body>
<div id="Layer1"></div>
<div id="Layer2"></div>
<div class="textbody" id="Layer3">
<p> </p>
<p> </p>
<p>asdfsadfsdfasd asdf sadf sadf safsa sdfsafasfj klsfkl jsfjksj dfklsjfk ljsdfjskfjklsj fklsjfklsdjfklsjfklsjklfjsklfjskfsjfklsjkljskdljfklsdjfklsjfklsjfklsajkflsjlkfjsklfjlksda</p>
<p> </p>
<p>sfsfk sdkl;f ksl;fksl;dfkl;skfl;skfl;kflskfkafksakf';kf'skdkfk kld;fk f dkl;f dfk;l dfak;lf asdfksald;fkas ff sad;fl fd k;lasdfk asdf;asflksdf asdf sadf </p>
<p>asdf</p>
<p>asf</p>
<p>saf</p>
<p>safs</p>
<p>dsasdf</p>
<p>a</p>
<p>asfs</p>
<p>dfsa</p>
<p>sf</p>
<p>sf</p>
<p>sf</p>
<p>sf</p>
<p>sf</p>
<p>sfd</p>
<p>saf</p>
<p>sf</p>
<p> </p>
</div>
<div class="style2" id="Layer6">This is a Page Title </div>
<div id="Layer7">
<div align="right" class="style1">Why Us? | Contact Us </div>
</div>
</body>
</html>
</font id=code></pre id=code>
Replies
Replied 03 May 2008 12:40:41
03 May 2008 12:40:41 Alan C replied:
I think the layers could be an issue - try having one div, then within that put your paragraphs
Think 'containers' so a div is a container that can hold lots of other things, and any of those can be nested divs too.
A useful thing is to use firefox and the developer's toolbar - it lets you see and edit the css dynamically so you can see exactly what happens as you change things
Think 'containers' so a div is a container that can hold lots of other things, and any of those can be nested divs too.
A useful thing is to use firefox and the developer's toolbar - it lets you see and edit the css dynamically so you can see exactly what happens as you change things