我认为我已经彻底搜索了这个网站,但是找不到解决我的问题的答案;我也认为这很简单,但在苦苦思索几个小时后,我放弃了并决定寻求帮助...
这是我的问题:我有一个DIV,其中包含两个DIV; 第一个DIV,“快照”包含返回网站快照的脚本,使用websnapr.com;快照大小为202 x 150,因此我将该DIV的宽度定义为230像素。第二个DIV,“描述”,应显示在该快照的右侧,并包含一些文本。我的问题是文本末尾流动到“快照”的周围,即在其下方,而我希望它始终保持在“快照” DIV 的右侧,而不是在其下方。
所以,你看到1到10行没问题;我希望11和12行以及其余文本都与1-10行对齐,而不是在快照下面!
以下是代码:
这是我的问题:我有一个DIV,其中包含两个DIV; 第一个DIV,“快照”包含返回网站快照的脚本,使用websnapr.com;快照大小为202 x 150,因此我将该DIV的宽度定义为230像素。第二个DIV,“描述”,应显示在该快照的右侧,并包含一些文本。我的问题是文本末尾流动到“快照”的周围,即在其下方,而我希望它始终保持在“快照” DIV 的右侧,而不是在其下方。
所以,你看到1到10行没问题;我希望11和12行以及其余文本都与1-10行对齐,而不是在快照下面!
以下是代码:
<div class="entry">
<h2 align="center">Some title here...</h2>
<div id="snapshot"><script type="text/javascript">wsr_snapshot('some link here', 'some pass here', 's');</script></div>
<div id="description"><p>Line 1<br>Line 2<br>Line 3<br>Line 4<br>Line 5<br>Line 6<br>Line 7<br>Line 8<br>Line 9<br>Line 10<br>Line 11<br>Line 12<br></p>
<p align="left">Link:<br>
<a href="#" target="_blank">some link here</a></p></div>
</div>
以下是这些ID和类的CSS样式:
.entry {margin:0 0 20px 0; border:2px solid #fff; background:#e6e6e6 url(images/bg.png) repeat-x; color:#333; padding:10px 10px 0 10px; min-height:200px; height:auto !important; height:200px; }
#snapshot {float:left; width:230px;}
#description {display: block; margin-left:240 px;}
我尝试了各种属性如display、clear、overflow等来控制这两个DIV,但是均未成功;希望有人能够说明我漏掉了什么...