Several facts:
- The viewport height is not normally something the page rendering engine takes into account. It is expected to place things against the top, and then add them on downward until it runs out of material. The emphasis is in fitting things to the page horizontally. If it won't fit, the page expands downward.
- Vertical centering is not generally provided, because of the above, and because different computers have different screen resolutions.
- It is almost impossible to make something exactly fit a page in all browsers, screen resolutions, font size settings, opened window sizes, and browser defaults.
- You can define styles for the td and th tags setting the text-align and vertical-align styles to what you want. This overrides the browser defaults.
- To keep stuff from rendering different between IE and FF, do not put size styles (height and width) and nonzero surrounding styles (margin, border, and padding) in the same tags or styles. IE and FF render them in the opposite nesting order. Use two nested tag pairs to specify the order they will be applied.
I suggest that you center things horizontally, and let the vertical parts end up where they do. Busting your buttons over trying to center stuff on the page vertically in all browsers and window sizes is a waste of time.
Last edited by MidiMagic; Apr 14th, 2008 at 5:53 pm.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
Offline 3,314 posts
since Jan 2007