The life and times creating engaging media experiences.

CSS

» to Main Page
Specifying the Absolute Position of a DIV Relative to a Centered DIV

There is a particular technique for specifying the absolute position of one <div> relative to another centered <div> instead of relative to the web page as a whole. The technique described below works with Internet Explorer, Firefox and Safari.

In the example shown below, there was the desire to have the "div-centered" <div> centered on the page and have the "div-absolute" <div> positioned 175 pixels from the left border of the "div-centered" <div>, regardless of the user's browser window size. The code used to accomplish this requirement is available at this link.