White space around tables

liunx

Guest
Here is a problem I have had with many tables I have built and can never seem to fix it, when I build a table that is to take up the whole page and then set a background color for the table there is always a white space around the outside of the table, how do I get rid of it?<br />
<br />
This is the page I am having trouble with:<br />
<!-- m --><a class="postlink" href="http://www.marcusandmeagan.com/template">http://www.marcusandmeagan.com/template</a><!-- m --><br />
<br />
This is what I want it to look like:<br />
<!-- m --><a class="postlink" href="http://www.litehouseauto.com">http://www.litehouseauto.com</a><!-- m --><br />
<br />
The second site I have here has the same basic format but they do not have any white space around the border and I can't find how they did it, thank you for any help you can give me.<!--content-->You need to set the margins of the HTML document. To do this, you can add a few simple attributes to the BODY tag. These are:<br />
<br />
topmargin<br />
leftmargin<br />
rightmargin<br />
bottommargin<br />
marginwidth<br />
marginheight<br />
<br />
So, to do what you wanted to do, alter your BODY tag as follows:<br />
<br />
<BODY ... topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0 marginwidth=0 marginheight=0 ...><br />
<br />
The ... is just to represent additional attributes such as BGCOLOR that you might want to include.<br />
<br />
-Sam<!--content-->Place your margin functions inside speech marks i.e.<br />
<br />
rightmargin="0"<!--content-->Speech marks aren't always necessary in HTML 4.0. They are required when the attribute contains characters other that letters, numbers, hyphens, or full stops.<br />
<br />
So in this case, you wouldn't need them<br />
<br />
-Sam<!--content-->Thank you very much for the replys, my forehead was getting raw from beating my head off the wall trying to figure this out.<!--content-->ok cli_man, for one you see a comparison with the fist site you posted? I don't. the first site is week as far as html is concerned. you don't have a closing body and half of your table cells are open. not good. fix those and I bet your html would improve. :)<!--content-->
 
Back
Top