1

I have a footer that has 3 columns of content. Currently the css is using float:left. I have tried the following but I just cant get it to align vertical and horizontal.

  • display block
  • display block-inline
  • margin: 0 auto

HTML:

<div id="footer">
  <div class="column">
    <h3>Information</h3>
    <ul>
            <li><a href="">Delivery Information</a></li>
            <li><a href="">Privacy Policy</a></li>
            <li><a href="">Terms &amp; Conditions</a></li>
          </ul>
  </div>
</div>

CSS:

#footer .column {
    float:left;
    width: 25%;
    min-height: 100px;
}
3
  • 1
    What do you mean by "align vertical and horizontal"? Commented Aug 30, 2011 at 4:40
  • @Sheen I am wanting the boxes in the footer to be aligned not the content Commented Aug 30, 2011 at 4:48
  • See my new answer. have tested this here and it works Commented Aug 30, 2011 at 5:43

4 Answers 4

1

You should use container div with position absolute and #footer should have position relative. Here is the solution code http://jsfiddle.net/7Pcag/1/

or more simpler solution http://jsfiddle.net/7Pcag/5/

Sign up to request clarification or add additional context in comments.

Comments

1
.column ul li{
    float:left;
    width: 25%;
    min-height: 100px;
}

the above will align then horizontally if that's what your question is asking

edit

<div class="footer" id="footer">
    <div class="column">
        <h3>Information</h3>
          <ul>
            <li><a href="">Delivery Information</a></li>
            <li><a href="">Privacy Policy</a></li>
            <li><a href="">Terms &amp; Conditions</a></li>
         </ul>
     </div>
</div>
.footer.column{
    float:left;
    width: 25%;
    min-height: 100px;
}

2 Comments

I am wanting the boxes in the footer to be aligned not the content
I want to align cl.ly/3f1H1q3k0P370s1V0w3n in the middle of the footer box
0
<div class="footer">
<div class="columns">
    <div class="column">
        Information
        <ul>
            <li>One</li>
            <li>One</li>
            <li>One</li>
        </ul>
    </div>
    <div class="column">
        Information
        <ul>
            <li>Two</li>
            <li>Two</li>
            <li>Two</li>
        </ul>
    </div>
    <div class="column">
        Information
        <ul>
            <li>Three</li>
            <li>Three</li>
            <li>Three</li>
        </ul>
    </div>
</div>
</div>

<style>

.footer
{
    width:100%;
    background-color:Yellow;
}

.footer .columns
{
    text-align:center;
}

.column
{
    text-align:center;
    display:inline;
    width: 150px;
}

</style>

Comments

0

I believe you already have the correct solution, so you might be doing something else wrong. I adjusted your min-height to 150px and things work fine here: http://jsfiddle.net/xkdk9/1/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.