Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to get rid of spacing around new table in website

Status
Not open for further replies.

diederikvanveen

Technical User
Sep 15, 2005
5
NL
If I create a table in a page and align left, their always stays some spacing on the left and top side of that table. How do i place the table so it doesn;t show that spacing. see:
chrisk-table.jpg
 
You would use the following CSS:
Code:
<style type="text/css">
body {
  margin:0;
  padding:0;
}
</style>
You can also do it "old-skool" by setting these parameters on the body tag directly (this is not the recommended solution, however).

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
First of all, no aligning is needed. If none exists, elements will position themselves in top left corner. However, you cannot put it all the way there, because that gap is the margin (or padding) of the body element. So, what to do is nullify that:
Code:
<body style="margin: 0; padding: 0;">
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top