我想创建这样的HTML:
文字从&#34开始;我们都长大了,重申我们的自我......"有两行图像,第三行像左对齐
我为此采取以下要素;
<ul class ="ariticaldiv">
<li>
<div>
<img src="../Images/DefaultPhotoMale.png" alt="" />
<span>Think About there benefits , Your Brand is your Equity</span>
<span><span>By : xxxxx</span><span>Director Of HR</span></span>
<span><span>Post:</span><span>March 3,2014</span></span>
<label>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx some long text here xxxxxxxxxxxxxx</label>
</div>
</li>
</ul>
我怎么能这样做?
答案 0 :(得分:1)
如果你渲染浮动图像,你就可以获得你想要的东西:
HTML:
<img src="../Images/DefaultPhotoMale.png" alt="" class='floated_image' />
CSS:
.floated_image
{
float:left;
margin-right:10px;
}
答案 1 :(得分:0)
试试这个
<div>
<p style="width: 250px">
<img src="../Images/DefaultPhotoMale.jpg" alt="" style="float: left; width: 50px; height: 50px;margin:2px" />
<span>Think About there benefits , Your Brand is your Equity
By : xxxxx Director Of HR
Post: March 3,2014
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx some long text here xxxxxxxxxxxxxx
</span>
</p>