Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

expand lenght of table 100% for any screen resolution--urgent 500 points

i know how to expand the width of a table to 100%   but when i try to also expand the lenght of a table 100% it will not do it.

is there a trick to do this?
this is my code
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#000000">&nbsp;</td>
  </tr>
</table>
0
gianitoo
Asked:
gianitoo
  • 2
  • 2
1 Solution
 
JaaxCommented:
By length dont you mean width ?
What exactly do you mean by length ?
0
 
gianitooAuthor Commented:
height
0
 
ThinkPaperCommented:
Read this: http://apptools.com/examples/tableheight.php

Table height isn't really valid code to begin with and isn't widely supported since tables are aimed at displaying tabular data - not layout. Any specific reason the table height needs to be 100%? If it's a layout/display issue, consider using DIVs instead.

Either way.. I found this code off the web.. it may work for you..
<html>
   <head>
      <style>
         html, body {height: 100%; margin: 0px;}
      </style>
   </head>
   <body>
      <table style="height: 100%;border-width:1px;border-color:black;" height="100%">
         <tr><td>content</td> </tr>
      </table>
   </body>
</html>
0
 
gianitooAuthor Commented:
look at this website
http://www.justmarketing.com/jmi/presentation/jmipres.html

i would like the white to be all the way down even with no content.  it will just look much better i think.  what do you recommend?
0
 
ThinkPaperCommented:
You are using tables as a way to design and layout the page. It's better to use divs instead. It's much more flexible and is the correct way to use it.

However, the code above should work fine.

For info on height % on divs, check:
http://www.webmasterworld.com/forum83/200.htm
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now