我想在css中創建一個帶有標題的簡單聊天室,我嘗試將聊天對齊到頁面底部,並在頁面的右側。我曾嘗試使用CSS:將兩個div對齊到頁面底部的位置:絕對
float: right;
bottom: 0;
position: absolute;
它將其與頁面底部對齊,但不在右側。這裏是我完整的代碼
CSS
#chatbox {
height: 360px;
width: 320px;
border-left: 1px solid #000;
border-right: 1px solid #000;
border-bottom: 1px solid #000;
float: right;
bottom: 0;
position: absolute;
}
.chatheader {
font-family:'PT Sans';
background: #999;
width: 322px;
height: 36px;
color: #fff;
text-align: center;
padding-top: 15px;
}
HTML
<div class="chatheader">chatboxheader</div>
<div id="chatbox">
</div>
下面是代碼DEMO 的演示這只是一個非常簡單的腳本,因爲我想獲得它對齊首先,稍後我會讓它看起來更好。在此先感謝任何能夠幫助我的人!
謝謝!沒有注意到這很簡單,我會在兩分鐘內選擇答案。 – blackhawk338
@ xGh0stSn1p3r歡迎:) – Hiral