在此页面上:www.incfilms.net / services,我的目标是将广告和咨询图片移到该段的右侧。
主页有:
<div class="serviceinfo">I am Not a Communist is now proud to offer a new range of digital video and media services to you and your business. We're calling it INC Pro.
<p>We are able to meet and focus with our clients on finding customizable solutions that are specific to their exact needs and objectives.
<p>We encompass the expertise and capabilities to create professional quality media; offering a number of services ranging from pre
through post production consultation, shooting and capturing, editing, color matching, audio leveling and digital mastering.
<p>Please contact us for a quote or more information at <?php echo $adminemail; ?> or call at <?php echo $phonenum; ?>.
</div>
<!--ADVERTISING AND CONSULTING LOGO -->
<div class="adconsul"><img src="media/advert.png" width="350" height="120"/></div>
CSS表格有:
.serviceinfo {
width: 600px;
text-align: left;
clear: both;
color: white;
font-family: Arial, Helvetica, sans-serif;
font-size: small;
}
.adconsul {
width: 350px;
float: right;
margin: auto;
color: white;
padding-bottom: 100px;
}
我可能不应该使用右边的浮动,但有没有办法可以将该图片放在段落的右边并将页脚保持在底部?谢谢
答案 0 :(得分:3)
尝试将一个浮动:放在.serviceinfo类中 你想在浮动div之后使用以下内容
<div style="clear:both;"></div>