CSS Center DIV Absolute Position

CSS DIV Absolute Position

The below css code used to position your DIV in the absolute position mentioned via, top, left, margin and width measurements

#container {
width: 140px;
border: 1px solid #666666;
position: absolute;
top: 0px;
left: 50%;
margin-left: -70px; /* width/2 */
}


Related Topic How to Set Horizontal and Vertical Align for Div
Div Tag Horizontal and Vertical Alignment
CSS Image Centering
How to Control the Position of Child Controls on Screen by Android Layout Managers
Web Browser JSP plugin tag Elements Parameter Attributes

nScraps.com 2011   Privacy Policy  Terms of Service  Feedback