![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
I AM WEB 2.0
Industry Role:
Join Date: Jan 2003
Posts: 28,682
|
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
I make pixels work
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
|
i do well with margin auto... and usually a fix with IE...
is that giving you issues across browsers?
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
I make pixels work
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
|
oh wait you mean like center hieght and width dont you...
depending on browser res and everything?
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
I AM WEB 2.0
Industry Role:
Join Date: Jan 2003
Posts: 28,682
|
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 ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
I make pixels work
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
|
Nice
![]()
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Oct 2003
Posts: 1,653
|
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
__________________
Domagon - Website Management and Domain Name Sales |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
I AM WEB 2.0
Industry Role:
Join Date: Jan 2003
Posts: 28,682
|
Quote:
center of browser height, not center of table height. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Oct 2003
Posts: 1,653
|
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
__________________
Domagon - Website Management and Domain Name Sales |
![]() |
![]() ![]() ![]() ![]() ![]() |