它不留在我想要它,看看这个:CSS花车搞砸
<div style="float: left; width: 30%">
<img src="{avatar}" alt="" />
</div>
<div style="float:right; width: 70%; text-align: left">
{message}
</div>
<div style="clear:both"></div>
Internet Explorer中:
http://i32.tinypic.com/34sfiu9.png
Mozilla Firefox浏览器:
http://i28.tinypic.com/2vm9cab.png
我希望文字在顶部(尝试vertical-align:top),并且我想要图像在IE中的白色框中。
希望更熟练的人可以帮助我。
谢谢! 想不通的问题:/
编辑:增加了整个代码
* { padding: 0; margin: 0; }
body {
font: 11px Geneva, "Trebuchet MS", Arial, Verdana, sans-serif;
width: 999px;
background: #EFEFEF;
}
#content {
width: 400px;
}
.thread-content {
padding: 5px;
border: 1px solid #CECFCE;
background: #FFF;
}
div.header {
border: 1px solid #CECFCE;
background: #FFF;
margin-bottom: 10px;
}
<div id="content">
<div class="header">{title}</div>
<div class="thread-content">
<div style="float: left; width: 30%; padding: 5px">
<img src="{avatar}" alt="user avatar" />
</div>
<div style="float: right; width: 70%; text-align: left">
{message}
</div>
<div style="clear:both"></div>
</div>
</div>
您是否也可以包含父容器元素的html/css? – 2009-07-11 14:42:15
@chris:已完成交易 – Digerdoden 2009-07-11 15:09:10