I'm having trouble aligning the middle paragraph in an HTML footer. I attempted to use floats for layout: the first paragraph is floating to the left, the third paragraph is floating to the right, and the second (middle) paragraph has a margin of 0 auto. Each paragraph is also set to a width of 250px. Could someone please point out what mistake I might be making?
footer {
background: #fff;
border-top: 1px solid #ece9e9;
border-bottom: 1px solid #ece9e9;
clear: both;
overflow: hidden;
}
footer .footer-content {
margin: 0 auto;
padding: 40px 0 20px 0;
width: 960px;
background-color: red;
}
footer .footer-content > div {
width: 250px;
display: inline-block;
}
footer h5 {
font-size: 15px;
margin-bottom: 25px;
text-transform: uppercase;
}
footer p {
margin-bottom: 25px;
}
.footer-content .footerServices {
background-color: yellow;
float: left;
}
.footer-content .footerNewsLetter {
background-color: yellow;
float: right;
}
.footer-content .footerContact {
background-color: blue;
margin: 0 auto;
}
<footer class="footer">
<div class="footer-content">
<div class="footerServices">
<h5>Services</h5>
<p>
first paragraph
</p>
</div>
<div class="footerContact">
<h5>Contact Us</h5>
<p>
second paragraph
</p>
</div>
<div class="footerNewsLetter">
<h5>Sign To Newsletter</h5>
<p>
third paragraph
</p>
</div>
</div>
</footer>