Solution Enhanced by jQuery
Utilizing the HTML structure provided:
<div class='inner-conversation-container'>
<div class='conversation-stream-container'>
<!-- Single item example -->
<div class='conversation-item'>
<!-- Message elements -->
<div class='conversation-message-part' msg-id='125'>
<div class='center-part'>test 9</div>
</div>
...
<div class='conversation-message-part' msg-id='143'>
<div class='center-part'>no, it's not</div>
</div>
<div class='conversation-message-part' msg-id='144'>
<div class='center-part'>latest needs to be in the bottom</div>
</div>
</div>
</div>
</div>
Streamlined CSS for easier styling:
.inner-conversation-container {
height: 200px;
width: 500px;
border: 2px solid lightgray; /* demo purposes */
overflow: auto;
}
.conversation-stream-container {
background-color: yellow; /* demo purposes */
}
jQuery used to adjust scroll bar position:
$('.inner-conversation-container').scrollTop(
$('.inner-conversation-container')[0].scrollHeight
);
Check out this Live demo: http://jsfiddle.net/audetwebdesign/FW6Y5/