I'm currently working on a chat on a webpage for a project, but I have encountered a problem with the chat. When I write a new message, the message appears under the (hidden) chatbox and I have to manually scroll to see the messages. I'm working with Jade, CSS and JS but have not found a solution.
I have a div called #chatwrapper and inside that I have .content
this is the Jade
.formwrapper
form(id='messageform', action='', method='GET')
textarea(class='form-control1' type='text' id='messagefield'autocomplete='off')
input(class='pure-button' type='submit' id='sendmessage' value='send')
this is the CSS
#chatwrapper {
float: left;
background-color: none;
height:100%;
width:380px;
text-align: center;
color: white;
margin-left: 5px;
margin-right: 5px;
}
CSS for the content
#chatwrapper .content, #feedwrapper .content{
height: 440px;
overflow: auto;
background-color: #EDEDED;
margin: 6px;
border-radius: 5px;
box-shadow: 0 0 3px 1px #888888;