Grow your CSS skills. Land your dream job.

centering a div

  • # April 12, 2013 at 10:35 pm

    I am working on a template and I am trying to do things I have never done before. I am working on a full page background image that slides and I want to center the photo caption on the screen. Right now, I used absolute positioning with 50/50% left, top.

    My issue is that it centers the div from the left side of it. So it makes it look off center. How do I get it to center the div from the center of the div instead of the left side? My container does not have a size to it.

    # April 15, 2013 at 11:38 am

    Demo please?
    http://www.codepen.io

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

You must be logged in to reply to this topic.

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