Re: Table height in xhtml

by Andrew McFarland <aamcf(at)aamcf.co.uk>

 Date:  Sun, 17 Mar 2002 22:34:32 +0000
 To:  "Hwg-Basics List (E-mail)" <hwg-basics(at)hwg.org>
 In-Reply-To:  umr
  todo: View Thread, Original
At 07:57 17/03/02 -0600, Hall, Richard H. wrote:
<snip/>
>I also posted a question about trying to put an object in the absolute 
>middle of a page, by creating a table that is 100% height and 100% width 
>and then using middle and center with <td>.  It wouldn't work in IE or 
>Netscape 6 when I had the xhtml validation statement at the top of my 
>pages, but would when I didn't.

That sounds like an excellent example of standards vs quirks mode. I must 
make a note of that.

<snip/>
>I'm still looking for any other tricks you might know of for putting 
>something in the absolute middle (height AND width) of a page

There are two ways that I can think of, both of which have problems: make 
the thing you want centered a background image, or use JavaScript to detect 
the window size and resize accordingly.

There is currently no way in CSS or XHTML to vertically center something, 
partly because there is no clear, unambiguous, meaning of what the vertical 
center of an HTML document is. If it is any consolation, giving something 
generous top and bottom margins is usually sufficient to make it look 
*almost* vertically centered.

I must admit I can't think of any circumstances where you would want an 
element vertically centered on an arbitrary document in arbitrary display 
circumstances, but I'm always looking for examples.

Andrew

--
http://aamcf.co.uk/

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA