[thelist] Vertically Centering Tables

Nebula Nebula at Planet-Nebula.com
Wed Feb 19 15:25:01 CST 2003


><><><><><><><><><><><><><><><
>Either use <div id="content"> or replace the #content selector with
text-align: center; in the body {}
><><><><><><><><><><><><><><><

Yes, I'm sorry.  I realized that after sending this message.  I am now
using <div id="content">.

><><><><><><><><><><><><><><><
> > This doesn't seem to work in IE, either.
> No. It doesn't.
><><><><><><><><><><><><><><><

What I meant when I said it didn't seem to work, well, maybe I wasn't
clear enough.  The example on the page
(http://www.wpdfd.com/editorial/wpd0103.htm#toptip) does work perfectly
with IE, and Mozilla (and Opera if you select the 2nd example).  When I
said it didn't work, I meant it wasn't working for me.

Anyways, I know this would work perfectly fine for me, but I have one
problem, which I stated earlier (and didn't get noticed, apparently).
That tip *REQUIRES* your content to have a definate width and height.
For my page, it is 90% of the browser window (it's a proportion).  The
height changes from page to page, depending on how much (or little)
actual information there is.  Can anyone offer any suggestions?  I've
played around with it, and it isn't working.  And I don't like the look
of the page if all the content is at the top, and there's a lot of
blankspace at the bottom of the window.

I hope I'm being clear enough this time.  It seems silly that they
depreciated a function (the valign attribute in table tags), and made it
this hard to do it otherwise.  While I want to be as standards-compliant
as possible, I may just use valign="middle" so my content is centered.
But then again, being the silly thing it is, Mozilla never did that
right anyways.  So I'm stuck.

Everything would be fine if you could just assign tables heights (and
have it be in the standard)!  >:O  (and no, putting the table in a class
where it specifies a height doesn't work...atleast not for me.)





More information about the thelist mailing list