Grow your CSS skills. Land your dream job.

[Solved] Centering Footer Widgets

  • # November 25, 2009 at 6:21 pm

    Hi guys..

    Av messed up my code trying to sort something out

    http://www.leehughes.co.uk

    as you can see the subfooter widgets are now on the left.. how do I move then center?

    Also you see the recent comments.. how can I space that out to make it look like the other two?

    Many thanks

    # November 26, 2009 at 12:52 pm

    The reason the spacing isn’t the same is because instead of adding padding: 5px to the <li>, you’ve actually added it to the <a>, and the recent comments has another style overwriting it.

    REMOVE:

    #subfooter a {
    padding:5px;
    }

    ADD

    #subfooter li {
    padding: 5px;
    }

    # November 26, 2009 at 12:55 pm

    Ahh cheers Doc..

    All sorted, looks so much better.. Just need to centre it now :D

    # November 26, 2009 at 1:28 pm

    It might not be the best way, especially if you’re going to add more widgets later on, but:

    REMOVE:

    #subfooter {
    display:inline; Not sure why this was there in the first place?
    }

    ADD:

    #subfooter {
    margin:0 auto;
    }

    CHANGE:

    #subfooter {
    width:720px;
    }

    # November 26, 2009 at 1:39 pm

    Ahhhh wicked.. normal service has presumed :D

    Cheers :D

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".