0

不知道问题是什么:http ://watercookies.topfloorstudio.com/

如果你向下滚动到“最新消息”,我试图让类的 div 与.newscontentright左侧的图像内联。我浪费了太多时间试图自己弄清楚。有什么帮助吗?

4

2 回答 2

1

需要设置 newscontentright 的宽度

.newscontentright {
       width: 300px;
 }

并从 newscontentleft 和 newscontentright 之间删除以下内容

 <div style="clear:both;"></div>

作为旁注,学习在不使用 clear 的情况下布局页面。仅在绝对必要时使用 clear ,否则事情会变得一团糟。“溢出:自动”通常是更好的解决方案。

在这种特殊情况下,清除是完全不必要的,所以只需将其删除。

于 2012-11-14T00:20:56.097 回答
0

也许在你第一次漂浮之前尝试你的清除?

<div style="clear:both;"></div>
<div class="newscontentleft">
<img class="imageshadow" width="178" height="122" alt="news1" src="images/news1.jpg">
</div>
<div class="newscontentright">   
<h3>Fall Blue Ridge Parkway “Bike for the French Broad”&lt;/h3>   
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse vestibulum, turpis ut hendrerit porttitor, lectus ipsumegestas sapien, ac tristique metus quam id est. </p>
<a> href="#">Read the full article »</a>
</div>
于 2012-11-14T00:29:22.507 回答