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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

HTML Tables

 
Greenhorn
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?
-Arvind
 
author
Posts: 15385
6
  • 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:
http://realworldstyle.com/2col.html
I think that is what you are after!
Eric
 
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.
WS
 
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
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic