The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

[Solved] Centering Footer Widgets

  • # November 25, 2009 at 6:21 pm

    Hi guys..

    Av messed up my code trying to sort something out

    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.


    #subfooter a {


    #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:


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


    #subfooter {
    margin:0 auto;


    #subfooter {

    # 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.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed