Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table height 100% HELP !!

Status
Not open for further replies.

wikfx

IS-IT--Management
Dec 16, 2001
196
MT
Hi all I am doing a web page I have 3 tables 1 at the top of the page for mt banner, another at the left side for my menu and another beside my menu for my content now I have an image I am placing for the BG of my menu the problem is I am trying to set the menu table to 100% height so that if I have more content when I scroll down the page I can see that image I have at the side like a bar going all the way down to the end of the page. but wen I set the table to height="100%" its not working can anyone please help !!!

Thanks
WiK

W i K
 
The height attribute (for a table) is not valid HTML. If you have specified a DOCTYPE for your HTML page, then this will guarantee that the height will be ignored... but if you leave out the DOCTYPE declaration there is a chance you will get it to work on some browsers (in "quirks" mode).

There are other solutions to your problem that do not require this "phantom" attribute.

- You could make a 1 px wide column in your table and put a transparent image in there with the height equal to the height of the BG image (this will cause the table to always be that height *at least*). This will work on all browsers.

- You could do some math using Javascript and set the height of a table cell directly. This will not work on all browsers, and will not work if the user doesn't have javascript.

- Put the BG image into an absolute DIV and place that behind (using z-index) the table (having previously set the width and height of the DIV to be the correct size).

Pick a solution... and if you have problems or questions... post back and I'm sure there will be someone to help.

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top