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

Div centering with Skeleton Boilerplate

  • # July 2, 2013 at 11:57 pm

    So.. Hi everyone, i am definitely a newbie when it comes to creating web pages, and I’m having a problem for centering a simple DIV in this new web page.

    I want to center this DIV, both image and text. I’m using skeleton boilerplate.

    Here is the HTML



    And here is the CSS

    #panel {

    margin: 0 auto;


    I just want #panel centered, and hopefully, both image and h1 tag would respect the responsive queries by skeleton.

    I apologize for the noobness in this questions..

    Thanks alot

    # July 3, 2013 at 5:10 am

    You can’t center using margin:auto unless the element has a specified width or max-width.

    # July 3, 2013 at 5:12 am

    You might try this…



Viewing 3 posts - 1 through 3 (of 3 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