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

    Also a screen shot of why it is so important the images have exact pixel values for positioning.

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

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

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

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed