*quickie CSS Q
*quickie CSS Q
Out of context: Reply #7
- Started
- Last post
- 17 Responses
- sp0
ok, right now, there really isn't a valid way of aligning block level elements in the middle.
vertical align is very very limited... in fact i don't think it's supported at all.
also - "text-align:center" only works in internet explorer to position entire blocks in the center.
the correct way is:
display:block;
margin-left:auto;
margin-right:auto;the thing i'm running into is that there isn't a way to properlly align the block in the middle - if you keep "top:50%" then it's too low on the screen...
also, btw - width and height don't really do anything in the body element.
that's the reason it doesn't work....the hack you're using probably isn't supported with the doctype and browsers other than ie.