954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

problem in css->overflow:scroll

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 overflow:scroll...
I need help...

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

ivanCeras
Newbie Poster
20 posts since May 2006
Reputation Points: 10
Solved Threads: 1
 

Can we see your code, please?

FC Jamison
Posting Pro in Training
Team Colleague
446 posts since Jun 2004
Reputation Points: 92
Solved Threads: 21
 

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>

<form name=form1 action='index.php'>
<input type='text' name='chat'>

<input type='button' value='send' onclick=preSend()>
</form>
</body>
</html>
ivanCeras
Newbie Poster
20 posts since May 2006
Reputation Points: 10
Solved Threads: 1
 

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.

phpdude
Newbie Poster
1 post since Jul 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You