javascript - HTML Comment Box automatically not increasing height -


i got html code creating comment box internet. works fine number of comments increases, comments appear on text present below it. want comments show in specific box scroll-bar. used div still comments flow out of box. tried whatever i'm not finding solution.

given below css using -

    <style>     #details {     display : block;     background-color : #9494ff;     height : 20px;     width : 130px;     padding : 4px;     border-radius : 10px;     border : 1px solid black;     cursor : pointer;     }      summary::-webkit-details-marker {         display: none         }      textarea {     resize : none;     }      #para {     display : block;     overflow : none;     height : 200px;     width : 100%;     resize : none;     }  </style> 

and here code -

<ul>  <form> <textarea id="words" rows="3" cols="60">enter comment</textarea> <input type="button" onclick="getwords()" value="comment" /> <br> <details id="details"><summary><center>view comments</center></summary><div id="para"></div></details> </form>  <script type="text/javascript"> function getwords() {   text = words.value;   document.getelementbyid("para").innerhtml += '<div>'+text   document.getelementbyid("words").value = "enter comment" } </script>  </ul> 

give wrapper div around property

overflow: scroll; 

on css-code


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -