Jump to content

external height not growing


csckid

Recommended Posts

when i write sth in textarea and click on comments button; height of Div #middleleft increases but not the height of div #middle. How can I increase the height of div #middle as well.

 

<html>
<head>
<title>Home</title>

<script type="text/javascript">
function pastecomments(){
text=document.getElementById('walltextarea').value;
//document.getElementById('homewalltext').innerHTML=text;



	var pTag = document.createElement("div");
	pTag.innerHTML=text;
	document.getElementById("homewalltext").appendChild(pTag);
}
</script>

<style type="text/css">


#middle{
background-color:#FFFFFF;
height:300px;
}

#middleleft{
float:left;
margin-left:15px;
margin-top:20px;
width:500px;
background-color:#33FFCC;

}

#write{
width:110px;
background-color:#f7a838;
color:#FFFFFF;

}

#homewalltext{
background-color:#99FFFF;

}
</style>

</head>
<body bgcolor="#173f16">

<div id="middle" >
		<div id="middleleft">
			   			   						
					<div id="expansion" >
				    
					<form><textarea rows='7' cols='60' id='walltextarea'></textarea></form><div id='write' onMouseOver='commentsover(this.id)' onMouseOut='commentsout(this.id)' onClick="pastecomments()">&nbsp&nbsp&nbsp&nbsp Comments</div>

					</div>

				<!--end of expansion-->
					<div id="homewalltext" ></div>				
			</div><!--end of middleleft-->	
</div><!--end of middle-->
</body>
</html>

Link to comment
Share on other sites

Are you trying to have #middleleft float left of #expansion or #middle?  There is no div for it to float left of, it's contained inside of #middle and has two other divs inside of it.  It will essentially not float next to anything in that case and just give you a buggy visual.  Try getting rid of the float property and see what it looks like or be more specific in how this is supposed to look.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.