Table issues

  • jhaylee
  • Newbie
  • Newbie
  • jhaylee
  • Posts: 10

Post 3+ Months Ago

I have created a page which is a table with three embedded tables. Is there a way that I can specify that the height of the table be 100% of the screen? I don't want people to have to scroll down the page when they are viewing it from a lower resolution than 1280 X 720.
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6375
  • Loc: twitter.com/unflux

Post 3+ Months Ago

I don't know what your table structure looks like, but I would assume to
make your outermost table height="100%"

If you've tried that, post your code so we can take a look. :)
  • jhaylee
  • Newbie
  • Newbie
  • jhaylee
  • Posts: 10

Post 3+ Months Ago

Thanks for the reply. I don't have the exact code with me(I'm at work), but this is the basic structure:

Code: [ Select ]
<table width="100%" cellpadding="0" cellspacing="0" border="0">
 <tr>
  <td>
   <table width="100%" cellpadding="0" cellspacing="0" border="0">
   //table 1 code
   </table>
  </td>
 </tr>

 <tr>
  <td>
   <table cellpadding="0" cellspacing="0" border="0">
   //table 2 code
   </table>
  </td>
 </tr>

 <tr>
  <td>
   <table cellpadding="0" cellspacing="0" border="0">
   //table 3 code
   </table>
  </td>
 </tr>
</table>
  1. <table width="100%" cellpadding="0" cellspacing="0" border="0">
  2.  <tr>
  3.   <td>
  4.    <table width="100%" cellpadding="0" cellspacing="0" border="0">
  5.    //table 1 code
  6.    </table>
  7.   </td>
  8.  </tr>
  9.  <tr>
  10.   <td>
  11.    <table cellpadding="0" cellspacing="0" border="0">
  12.    //table 2 code
  13.    </table>
  14.   </td>
  15.  </tr>
  16.  <tr>
  17.   <td>
  18.    <table cellpadding="0" cellspacing="0" border="0">
  19.    //table 3 code
  20.    </table>
  21.   </td>
  22.  </tr>
  23. </table>


I've tried using height="100%" for the outer table and I've also tried using absolute pixel values (height="550"). I also tried sizing the inner tables height to 33%, and I tried absolute pixel values for the inner tables also. Both in Netscape and IE I have to scroll down. One thing I found interesting was that when I ran the code through a HTML 4.0 Transitional validator I received messages saying that height is not a valid attribute for the table tag.
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6375
  • Loc: twitter.com/unflux

Post 3+ Months Ago

ok, I'm not one to use validators simply because I think they're not
worth the headache. If my designs look good in all browsers, the code is
irrelevant to me.

With that said, I think you actually doing the right thing, but missing one
piece. Add a margin tag set for the page properties like this, and it will
remove that padding about the outer table. Then you can adjust from
there. This will give you an adjustable, free-flowing 100% height:
Code: [ Select ]
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
 <tr>
  <td> <table width="100%" cellpadding="0" cellspacing="0" border="0">
    //table 1 code </table></td>
 </tr>
 <tr>
  <td> <table cellpadding="0" cellspacing="0" border="0">
    //table 2 code </table></td>
 </tr>
 <tr>
  <td> <table cellpadding="0" cellspacing="0" border="0">
    //table 3 code </table></td>
 </tr>
</table>
  1. <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  2. <table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
  3.  <tr>
  4.   <td> <table width="100%" cellpadding="0" cellspacing="0" border="0">
  5.     //table 1 code </table></td>
  6.  </tr>
  7.  <tr>
  8.   <td> <table cellpadding="0" cellspacing="0" border="0">
  9.     //table 2 code </table></td>
  10.  </tr>
  11.  <tr>
  12.   <td> <table cellpadding="0" cellspacing="0" border="0">
  13.     //table 3 code </table></td>
  14.  </tr>
  15. </table>
  • jhaylee
  • Newbie
  • Newbie
  • jhaylee
  • Posts: 10

Post 3+ Months Ago

thanks. I'll try it when I get home tonight. I agree with you about the validators, I ignore a lot of what they say. IE and Netscape seem to continue parsing html after errors are found. I don't test my code with the 10+ available browsers, so I use a validator as more of a syntax checker.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.