tags:

views:

1606

answers:

3
<table border="1" width="100%" ID="Table2">
<tr>
  <td>100</td>
</tr>
</table>

This code still leaves and "inch" of space on both sides of the table. Trying to get the table to span the entire width of the page. Thanks.

+3  A: 

you need to set the margin of the body to 0 for the table to stretch the full width. alternatively you can set the margin of the table to a negative number as well.

Tom Anderson
+2  A: 

There might be a margin style that your table is inheriting. Try setting the margin of the table to 0:

<table border="1" width="100%" ID="Table2" style="margin: 0px;">
<tr>
  <td>100</td>
</tr>
</table>
Kevin Tighe
Also it could be the width or margin of the parent element(s), all the way up to body/
BC
Is this the best way to over ride what is in the CSS?
Tommy
Eh, probably not. Rog's answer is good I think.
Kevin Tighe
+5  A: 

Try (in your <head> section, or existing css definitions)...

<style>
  body {
   margin:0;
   padding:0;
  }
</style>
Rog