100% Heights with CSS

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Goo
Forum Newbie
Posts: 4
Joined: Mon Sep 23, 2002 9:54 am
Location: Oxford, Ohio
Contact:

100% Heights with CSS

Post by Goo »

I am attempting to create a table that will fill the window 100% in the height axis. However, using the XHTML-Transitional doctype, I can't get the CSS to do this. Does anyone have any suggestions?

.tall-table {
width: 100%;
height: 100%;
}

This apparently does not work... at least in my testing it hasn't.

Thanks in advance for any help!!!
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

when working with tables the CSS height directive has no effect when given a percentage value. it will however work with a pixel value (ie. height: 600px;) but it does not seem that this is what you want. hope this helps.
Goo
Forum Newbie
Posts: 4
Joined: Mon Sep 23, 2002 9:54 am
Location: Oxford, Ohio
Contact:

Post by Goo »

Yes, I understand that the pixel values will work. I guess what I am really confused about is that the % values for the height work when I use the html 4.0 transistional doctype.

Is there any sort of work around to make tables, or even just a div block, expand to the height of the window?
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

not when dealing with XHTML because this is not the standard, it is a quirk that has been depreciated.
Post Reply