3
我做了一個小聊天。 CSS存在問題,因爲我比佈局設計師更像一名程序員。文本輸入寬度最大和輸入提交在一條線上
HTML:
<div class="chat_input_box">
<input type="text" class="chat_input_text" name="message">
<input type="submit" value="Отправить" class="chat_submit_button">
</div>
CSS:
.chat_input_box {
width: 100%;
}
.chat_input_text {
width: 83%;
}
.chat_submit_button {
margin-right: 0px;
}
的問題是,它不進入設置文本字段最大的無硬編碼的寬度(例如83%)。
可能重複[如何拉伸一個元素的寬度,因此,它的100米% - 它的兄弟姐妹的寬度?](HTTP:/ /stackoverflow.com/questions/3682649/how-to-stretch-the-width-of-an-element-so-that-its-100-widths-of-its-siblin) – BoppreH 2014-04-12 07:02:21
這可能是解決方案:http: //stackoverflow.com/a/8765917/252218 – BoppreH 2014-04-12 07:03:00