csckid Posted June 1, 2009 Share Posted June 1, 2009 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()">     Comments</div> </div> <!--end of expansion--> <div id="homewalltext" ></div> </div><!--end of middleleft--> </div><!--end of middle--> </body> </html> Link to comment https://forums.phpfreaks.com/topic/160453-external-height-not-growing/ Share on other sites More sharing options...
neogemima Posted June 6, 2009 Share Posted June 6, 2009 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 https://forums.phpfreaks.com/topic/160453-external-height-not-growing/#findComment-850725 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.