css positioning
css positioning
Out of context: Reply #3
- Started
- Last post
- 5 Responses
- heavyt0
horizontal centering is easy. Vertical positioning is much harder.
for horizontal, make a container div with margin:auto; and set the body{text-align:center}for Vertical, you can try top:50%; margin-top: -123px;}
replace 123 with half of the height of your object.
it works for most, but in mac IE, it ignores the 50%, so half of your object is off screen.TR1