Forum Moderators: open

Message Too Old, No Replies

Cell height in IE problem

         

bytech

3:19 am on Apr 5, 2004 (gmt 0)

10+ Year Member



I've looked around for this one, and found a few threads, but none seem to answer the question at the end of the day:

I have a two column, 3 cell table.
The left column has two cells on top of each other, while the right column has a cell that totals the height of the two cells stacked on the left side.

Here is the problem:

The upper cell on the left had side needs to be a fixed height. the td height attribute was used for that. The bottom cell can be as tall or short as needed.

The right hand cell has changing content, sometimes more, othertimes less. Whenever the content in the rigth hand cell totals to more height than the two cells on the left, the two cells on the left both get the extra space. I need the upper cell on the left to stay static (in real life I have four menu items on the left, and a fifth "stretch cell"... When I get too much content on the right, my menu items float appart across the full height of the right hand column).

I think I could just make a nested table on the left, and get around this, just valign=top the outside... but that seems like a dumb and dirty way of doing it... I know I shouldn't expect anything more form IE than dumb and dirty, but I thought I'd reach out and see if anyone got this one solved better.

Cheers.

tedster

4:02 am on Apr 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried css, using absolute positioning and z-index to place the menu in a div and position it properly?

I've never found a pure tables layout that handles this one cross-browser.

sgilbertie

3:15 pm on Apr 8, 2004 (gmt 0)

10+ Year Member



I've spent hours tearing my hair out over similar problems! :) I also have yet to find a solution that works perfectly on all browsers. One thing that I have gotten to work is to set the height on the bottom cell that you want to take the expansion to 100% - I usually end up fiddling with this alot and I can't remember off the top of my head what exactly works. Your own idea to nest a table and align it to the top will work and may be your easiest and most sure-fire solution - I don't think its cheating as long as its not adding gobs of unecessary code :)
Good luck!

bytech

5:40 pm on Apr 9, 2004 (gmt 0)

10+ Year Member



The nested table did it just fine, but I hate nested tables. :) There is a good reason why we have colspan and rowspan, + height and width attributes. I wish M$ would wake up and smell the roses...

Also, I am under the impression that nested tables slow down the loading of a site (I know, not by much with one extra table, but I like efficiency in every area)...

Thanks for the replies everyone. :)