Grow your CSS skills. Land your dream job.

DIV position: fixed; Center Horizontally

  • # July 6, 2013 at 12:35 pm

    **I am trying to horizontally center a series of img’s (which contain individual variables for LEFT and TOP, with FIXED position) it is really crucial that the variables for Top and Left remain the same for the position and function of the images.**

    Here’s a jsFiddle sample of what I’m working on.
    http://jsfiddle.net/TPLTz/1/

    Also a screen shot of why it is so important the images have exact pixel values for positioning.
    http://www.dropbox.com/s/c8zdssw4mj8tuuf/Screen%20Shot.png

    I don’t see what else I can do to accomplish this.
    Any input would be appreciated.
    Thanks.

    # July 6, 2013 at 1:11 pm

    Did you try to wrap those images in a div with the width of the images and centering that?

    # July 6, 2013 at 1:15 pm

    Thy are in a div.

    # July 6, 2013 at 1:50 pm

    If you want to do that you would have to add position relative to the wrapper and then **absolutely** (not fixed) position the gears inside that.

    Fixed position means the element is positioned relative to the browser window **not** to any wrapper.

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

You must be logged in to reply to this topic.

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