我正在尝试创建一个聊天窗口,它允许聊天消息(下面的#messages_window)将调整大小以适应聊天区域的标题和输入区域之间的空白区域。当它调整大小时,它仍然需要滚动。动态高度DIV滚动
下面是HTML我有:
<div id="chat_window">
<div id="header">
</div>
<div id="messages_window">
</div>
<div id="input_area">
<input type="text" id="chat_input"/>
<br/>
<input type="button" style="float:right;" onclick="Javascript:sendMessage();" value="Send"/>
</div>
</div>
这里是CSS:
#chat_window
{
position: relative;
width: 300px;
height: 100%;
border: 1px solid black;
}
#chat_window #header
{
width: 100%;
height: 30px;
background-color: #69acf1;
color: #ffffff;
border-bottom: 1px solid black;
}
#chat_window #messages_window
{
width: 100%;
/*overflow: hidden;*/
}
#input_area
{
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
}
#input_area #chat_input
{
width: 100%;
}
请阅读:[应该'嗨','谢谢',标语和致敬从帖子中删除?](http://meta.stackexchange.com/questions/2950/should-hi-thanks-taglines-and -salutations-be-removed-from-posts) – Antony 2013-05-11 06:08:44
从这么多的电子邮件发送的SOrry,习惯的力量。谢谢。 – 2013-05-11 06:10:16