PDA

View Full Version : How to center whole page vertically in browser?


sneather
10-27-2009, 07:46 PM
Hello. New here.

I'm using DW CS4, Mac.

I have created a template web page with the exact size of 1000-pixels wide, by 600-pixels tall. I was easily able to set the page to automatically center itself widthwise in the browser. However, I have no idea how to make it do the same for the vertical. There must be a way, right? I was able to do such with my OLD GoLive.

Thanks!

dzwestwindsor
10-28-2009, 01:02 AM
wat are you using when u say that ur thing is 1000 px wide and 600 pixels tall? if u are using a div tag, then go to ur CSS styles, and make the margins for top and bottom to AUTO. if u are using a table, idk, cuase tables are so olllddd :)

DWcourse
10-28-2009, 01:07 AM
Sorry but no. Setting top and bottom margins to auto will not center a div vertically.

domedia
10-28-2009, 03:06 PM
Maybe this link will help.
http://www.vdotmedia.com/blog/vertically-center-content-with-css