【发布时间】:2014-01-03 21:03:19
【问题描述】:
我如何设置两个并排的 div 和下面的第三个像这样
。
我当前的代码如下,将注释 div 放在名称 div 之后
HTML:
<div id="info_div">
<div id="info_div_name">Name</div>
<div id="info_div_time">6:30 PM</div>
<div id="info_div_note">Note</div>
</div>
CSS:
#contact_table_data {
width:inherit;
height:inherit;
background-color:#99cc33;
max-width:400px;
}
#info_div_name {
width:auto;
height:auto;
padding: 5px 0px 5px 10px;
float:left;
}
#info_div_time {
width:auto;
height:auto;
padding: 5px 10px 5px 0px;
float:right;
}
#info_div_note {
width:inherit;
height:auto;
position:static;
padding: 0px 10px 5px 10px;
}
【问题讨论】:
-
在 css 中寻找 child-nth。是件好事。