css positioning
- Started
- Last post
- 5 Responses
- airey
alrighty, i want a left aligned, vertically centered swf file.
any nt love for a simpleton!?
all help appreciated.
- airey0
please help! i'm dying here!
- monNom0
TABLES!
- 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
- airey0
thx all.
for now i'm back to using tables with the body height attribute set to 100%.
is it still true that PC's need the 100% body workaround otherwise it ignores tables that are marked as 100% height?
- welded0
That negative margins trick works just fine across all browsers but you have to take the doctype declaration out.