HTML for basic chat app
<div id="chat">
<div class="msg">
lorem...
</div>
<div class="msg">
lorem...
</div>
</div>
<form action="" method="post"><input type="text"><button>Reply</button></form>
CSS to set the height of chat window
html,body { height:100% }
#chat { height: 75%; overflow:scroll; }
Javascript to position the scrollbar at bottom
chat = document.getElementById('chat')
chat.scrollTop = chat.offsetHeight
lk;h,jn