Jump to content

keeping inside


csckid

Recommended Posts

when i write sth in textarea and click on "comment" button several times, the p tag goes outside the white background. How do I keep the height of div tag increasing as comment button clicked several times???

My writing may seems complicated, but after pasting the code you would definitely understand what i am talking about

 

plz help







<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("p");

	pTag.innerHTML=text;

	document.getElementById("homewalltext").appendChild(pTag);

}

</script>



<style type="text/css">
/* CSS Document */



#container{

margin: 20px 20px;

margin-top:0px;





}



#middle{

background-color:#FFFFFF;

height:300px;







}



#middleleft{

float:left;

margin-left:15px;

margin-top:20px;

width:500px; 

}











#write{

height:30px; 

width:110px; 

float:right;

padding-top:6px; 

background-color:#f7a838;



color:#FFFFFF;



}


</style>













</head>



<body bgcolor="#173f16">



<div id="container">







<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" style="background-color:#99FFFF"></div>













		</div><!--end of middleleft-->

		<div id="quicklinks">



		</div><!--end of quicklinks-->



</div><!--end of middle-->







</div><!--end of container-->





</body>

</html>



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.