不太清楚如何描述我想要实现的目标,所以我有一些屏幕截图.. 基本上,我希望<h2>
s 和 s 的顶部边缘都对齐<p>
。
我目前拥有的:
我想拥有的:
索引.html
<div id="services">
<p><span>Services</span></p>
<ul>
<li><h2>Identity and Logo Design</h2><p>Nulla et diam risus. Praesent vestibulum augue non purus tincidunt placerat. Sed in orci leo. Duis dignissim nibh vitae lacus placerat et posuere</p></li>
<li><h2>Branding</h2><p>Nulla et diam risus. Praesent vestibulum augue non purus tincidunt placerat. Sed in orci leo. Duis dignissim nibh vitae lacus placerat et posuere</p></li>
<li><h2>Web Design and Development</h2><p>Nulla et diam risus. Praesent vestibulum augue non purus tincidunt placerat. Sed in orci leo. Duis dignissim nibh vitae lacus placerat et posuere</p></li>
<li><h2>Social Media</h2><p>Nulla et diam risus. Praesent vestibulum augue non purus tincidunt placerat. Sed in orci leo. Duis dignissim nibh vitae lacus placerat et posuere</p></li>
</ul>
<div class="next">
<a href="#"><img src="img/next.png" alt="Click for more information" /></a>
</div><!-- end next -->
</div><!-- end services -->
样式.css
#services {
border-top: 1px solid #202020;
padding-bottom: 60px;
padding-top: 40px;
}
#services p span {
font-family: nevis-webfont;
font-size: 112.5%;
font-weight: normal;
letter-spacing: 1px;
text-transform: uppercase;
}
#services ul li {
display: inline-block;
padding-left: 100px;
width: 160px;
}
#services ul li:first-child {
padding-left: 0px;
}
#services ul li h2 {
padding-top: 20px;
text-align: center;
}
#services .next {
float: right
}