![]() |
What is the best way to vertical align center of a window?
I have a block and want it to float in the middle of a window. Any tips on how to do this?
Ive done some searches but cant seem to put my finger on it. |
i do well with margin auto... and usually a fix with IE...
is that giving you issues across browsers? |
oh wait you mean like center hieght and width dont you...
depending on browser res and everything? |
Quote:
http://blog.themeforest.net/tutorial...ring-with-css/ the 2nd example here ended up working for me actually. weird couldnt find it all day yesterday then 15min today works hehe. thanks i know you were gonna give it a shot, maybe it will help you in the future :) |
Nice :thumbsup
|
Or do it old school style with tables. Quick, easy, and predictable. And works in all major browsers dating back to the late-1990s.
CSS is fine most of the time, but tables are still useful in some situations. Ron |
Quote:
center of browser height, not center of table height. |
Oh, vertically align within the entire browser window ... ok, that is more challenging even with tables.
However, it can be done and still looks to be much simpler and more predictable than using CSS alone - see the following link for details ... http://apptools.com/examples/tableheight.php Tables and CSS together is likely your best bet for compatibility with recent browsers. Or if in a rush and "quirks mode" is good enough (it may be if your site already is already being rendered that way by default; many sites still are), then just add in the table attributes height="100%" - but as the above link points out, that's not recommended, because the height attribute, according to the article and based on my own experience, has never been part of any W3 html standard. Ron |
All times are GMT -7. The time now is 01:52 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123