2012-11-14 60 views

回答

1

您需要设置newscontentright

.newscontentright { 
     width: 300px; 
} 

的宽度,并且从newscontentleft和newscontentright

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

间删除下面作为一个侧面说明,学习设计页面布局,而无需使用明确的。只有在绝对必要时才使用清除,否则事情会变得混乱。 '溢出:自动'通常是更好的解决方案。

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

+0

这工作和溢出:自动解决了我使用明确的问题。非常感谢。 –

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”</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>