HTML:同一地点的文字

时间:2010-11-02 23:51:21

标签: html css

alt text

我的形象说明了一切。

#1截图是现在的样子

#2是我想要的

我该怎么做?

这是我目前的html:

<div>
<span style='float: left; margin: 10px; width: 60px; display: block;'>
<img style='border: 1px solid #FFF; width: 61px; height: 80px;' src='images/profilePhoto/thumbs/104.jpg'>
<br>Rafo O.
</span>
<h1>(inget ämne)</h1>
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec fringilla urna eget urna euismod aliquet. Duis porta volutpat blandit. Phasellus bibendum bibendum porta. Nunc molestie tristique leo, sed euismod orci ultricies vitae. Mauris non libero a leo ultricies laoreet. Suspendisse luctus urna vel sapien tristique vitae semper nulla eleifend. Integer congue aliquam pharetra. Phasellus diam neque, tincidunt vel elementum vel, ornare sit amet mi. Nulla tincidunt purus in odio vulputate mollis. Nunc urna odio, rutrum eu ultricies a, facilisis ullamcorper nunc. In purus velit, varius vel laoreet eu, tincidunt non purus. Nulla facilisi. Sed ac lectus nibh. Praesent non velit nibh.<br />
........
</div>
<p style='float: right; color: grey; font-weight: bold;'>1-11-2010 kl. 13:28</p></div>
<div class='clearfloat'></div>

1 个答案:

答案 0 :(得分:2)

在文字左侧添加一个边距:

<div style="margin-left:100px;">
    <h1>(inget ämne)</h1>
    <div>
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. [...]
    </div>
</div>

你应该考虑不引人注目的CSS并将你的样式移出你的标记(使用外部文件)。