我正在尝试在图像和项目符号之间放置一个段落。我认为我在 html 中有正确的布局,但由于某种原因,它只是没有正确显示。见下图:
如您所见,这些段落出现在其他所有内容下,但这不是它在我的 html 中的显示方式。请参阅下面的代码:
HTML:
<div class="services">
<div class="serviceHolder" style="opacity: 1;">
<div class="serviceBox" id="service-plan">
<div class="serviceIcon"><img src="images/icon-design.jpg" width="129" height="134" alt="design icon"></div>
<div class="serviceCopy">
<h2>Plan</h2>
<ul class="serviceBullets">
<li><h3>Objectives</h3></li>
<li><h3>Scope</h3></li>
<li><h3>Sitemap</h3></li>
<li><h3>Wireframes</h3></li>
</ul>
<p>Lorem ipsum dolor sit amet, porta quis urna tempor vestibulum purus, vulputate condimentum arcu faucibus aliquam enim accumsan, a nulla nullam morbi bibendum eveniet tempus, parturient consequat sociis quis. Suscipit in vitae ornare lobortis sed, porta et minima odio neque maecenas cras, justo in. </p>
<p>Justo arcu lacus, quos pellentesque nam sit. Luctus mauris egestas, leo nisl porttitor urna scelerisque ut, mauris sodales sapien donec dolor, arcu a ante vestibulum lorem vitae quam</p>
</div>
</div>
</div>
CSS:
.services {
width: 100%; float: left; margin: 30px 0;
}
.services .serviceBox {
width: 898px; padding: 30px; border: 1px solid #43C0C2; background-color: white; float: left; margin-bottom: 10px;
}
.services .serviceIcon {
float: left; margin: 0 30px 50px 0; width: 129px;
}
.serviceBullets {
float: right; font-weight: 100; width: 150px;
}
.serviceBullets li {
list-style-image: url(../images/bullet.gif); color: #43C0C2; margin-bottom: 10px;
}
.services h2 {
font-size: 40px; margin-bottom: 20px; color: #000000;
}