Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

HTML Tables

Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the HTML code for creating a page that contains a header, side nav, main body, and footer using tables. The specs are ...
1. The table should resize automatically to fit the whole window (even through resizes)
2. The header and footer "rows" should be compact and be tall enough to perfectly fit the contents
3. The side nav should take 25% of the width of the window
4. The main body should take 75% of the width of the window, but the height should stretch to take the remaining height of the window (basically main_body_height = window_height - footer_height - header_height)
I've come up with a solution; however, it involves specifying a height for the <tr> tag. And in all HTML references I've seen, <tr> DOES NOT support the height property (?)
Any thoughts?
Posts: 15385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should avoid using tables for layouts, CSS is the way to go!
look at this page:
I think that is what you are after!
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<TR> does support height, but like Eric said, use CSS. I've made pretty complex pages with nested tables, and when I test these pages across browsers, well, it wasn't pretty. Tables are extremely annoying if you are using them for layout, and you want your page to be compatible with all the major browsers (IE, Netscape, Safari, Mac IE, Firefox, etc.). Also, do yourself a favor, and code a page using CSS...see how much cleaner it is than using tables.
That new kid is a freak. Show him this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic