Am trying to create a cross-browser 3 column footer that are equal in width to each other, but doesn’t go beyond the main body width of 900px. This code isn’t doing it??
html
<div id="footer">
<p class="left">About<br />Contact<br />Next line here</p>
<p class="right"> does not evaluate or guarantee the accuracy</p>
<p class="centered">Terms<br />Privacy<br />Disclaimer</p>
</div>
css
#footer {
color: #ffffff;
width:100%;
background: #111;
clear: both;
overflow: auto;
}
.left {
text-align:left;
float:left;
}
.right{
float:right;
text-align:right;
}
.centered{
text-align:center;
}
The easiest solution I can see, with your current mark-up, is:
JS Fiddle demo.
Edited to suggest a slight revision, as your footer
divappears to be a list of links to other content, I’d suggest amending your mark-up, with the following as a suggested guide:And the CSS:
JS Fiddle demo.