tags:

views:

115

answers:

1

This table is not printing properly

<tr height="95%">
  <td width="100%">
    <div id="placeSchedule">
      <table bgcolor="red" width="100%" height="100%" border="1">
         <tr>
            <td>
              xyz
            </td>
         </tr>
      </table>
    </div>
  </td>
</tr>

> because of this <div> tag, my table
> under <dig> tag is not printing
> properly,, i am using AJAx here.. to
> overwrite things under <div> tag.. so
> please temme any alternative to <div>
> tag
+3  A: 

From that sample code you're missing a wrapper <table> tag.

Try this:

<table>
    <tr height="95%">
      <td width="100%">
        <div id="placeSchedule">
          <table bgcolor="red" width="100%" height="100%" border="1">
             <tr>
                <td>
                  xyz
                </td>
             </tr>
          </table>
        </div>
      </td>
    </tr>
 </table>

Edit: To clarify my comment:

the 100% height attribute of the table is going to set the height to 100% of the parent element.

You can either explicitly state the height of the table, or set it through CSS. If you take out the percent symbol, that should set the height of the table to a static 100 pixels.

MunkiPhD
thats ok,, i have written that table tag.. i have just send the part of that code... Under <div> tag, the table which i have written is not printing its height 100%, instead only 10 or 20%.. dont know why..
AGeek
Then it sounds like youre setting the height in some parent element, e.g. the DIV, the TD, or the TR above that inner table. When you say "height=100%" it will set the height to 100% of the parent. Try either setting it through css as set height or setting the parent's height
MunkiPhD
when i remove <div> tag it works fine.. its only when i put <div> tag and output doesn't comes properly...
AGeek
we still don't know what you're trying to achieve. I don't think anyone can provide an answer any further than we have without an example and your code.
MunkiPhD