[Javascript] Div overflow autoscroll
Posted: Sun Mar 16, 2008 10:13 am
hello dudes
i got a problem i have written a chat application using Zend Framework and jQuery
I got the chat container
And the css
As you can see that when to many message enter the message-container a scroll is added.
My problem is that i always want the scroll at the bottom of the page.
I got the chat container
Code: Select all
<h2>Chat</h2><p id="warning" style="color:red;"> This page requires javascript to function.<br> Please enable javascript to join our chat.</p><div id="message-container"></div><div id="message-output"> <input type="text" maxlength="120" size="95" id="message"></div><br><div id="info"> Please rember to not flood the channel.</div> Code: Select all
#message-container {
margin-right:5px;
border:1px solid #CCC;
height:400px;
overflow:auto;
}
#message-output {
margin-right:5px;
padding:5px;
border-left: 1px solid #CCC;
border-right: 1px solid #CCC;
border-bottom: 1px solid #CCC;
}
#message-output input {
border:1px dashed #CCC;
}
#message-container p {
border-bottom:1px dashed #CCC;
margin:0px;
padding:5px;
font-size:15px;
}
My problem is that i always want the scroll at the bottom of the page.