Hi everyone,
Does anybody knows how to position the scroll bar of the code generated by the
css div{overfolw:scroll}?..
The default position of the scroll bar is on the top.. now, what i want is to position the scroll bar at the bottom of the <div> overflow:scroll...
I need help...

I really appreciate if anyone could do these...:)

Recommended Answers

All 3 Replies

Can we see your code, please?

here is the code.... just for a simple chat program..
the chat message will be display at the div class:'chit'
the chat message has an id 'chat'... which will be diplayed on the screen..
chat.js execute an ajax script to get the chat data from the server...
hope u get me...
thanks...

<html>
<head>
<script src='chat.js'></script>
<script type='text/javascript'>
function preSend(){
    message=document.form1.chat.value
    send(message)
}
function preReceive(){
    receive()
    setTimeout('preReceive()',500)
}
</script>

<style type='text/css'>
    div.chit{
        background-color:'#00FF00';
        width:150px;
        height:150px;
        overflow: auto
    }
</style>
<LINK REL="SHORTCUT ICON" HREF="favicon.ico">
</head>
<body onload='preReceive()'>
<div class='chit'>
<span id='chat'>
</span>
</div>
<br>
<form name=form1 action='index.php'>
<input type='text' name='chat'>
<br>
<input type='button' value='send' onclick=preSend()>
</form>
</body>
</html>

yeah i have the same problem. a stupid way to solve the problem is to make a chat on the reverse order, i mean by reading from bottom to top, like the message you just typed will appear on top. you can do this in mysql using a ORDER BY -id_table.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.