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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set Table Margins

Status
Not open for further replies.

vikramonline

Programmer
Oct 14, 2003
186
IN
I am new to HTML.I need to know whether we can eliminate the margins left by the table tag.
Any help will be apprecited.
 
hey, i have given an answer in the ASP forum, please dont post duplicate threads!!!

Known is handfull, Unknown is worldfull
 
vikramonline,

Welcome then!! Yes, you are in the right forum with questions about HTML.

When working with tables, the (inner) margin is called padding. You can control the padding for the entire table in straight HTML or with CSS (STYLE).

Have a look at this brief example:

Code:
<HTML>
<HEAD>
  <TITLE>Table Padding</TITLE>
</HEAD>
<BODY>
  <H1>TABLE 1 : NORMAL</H1>
  <TABLE BORDER=&quot;1&quot;>
    <TR>
      <TD>
        Table # 1
      </TD>
      <TD>A</TD><TD>B</TD><TD>C</TD>
    </TR>
  </TABLE>
  <H1>TABLE 2: NO PADDING AT ALL</H1>
  <TABLE BORDER=&quot;1&quot; CELLSPACING=&quot;0&quot; CELLPADDING=&quot;0&quot;>
    <TR>
      <TD>
        Table # 2
      </TD>
      <TD>A</TD><TD>B</TD><TD>C</TD>
    </TR>
  </TABLE>
  <H1>TABLE 3: LEFT PADDING = 10</H1>
  <TABLE BORDER=&quot;1&quot; CELLSPACING=&quot;0&quot; CELLPADDING=&quot;0&quot; STYLE=&quot;padding-left:10px&quot;>
    <TR>
      <TD>
        Table # 3
      </TD>
      <TD>A</TD><TD>B</TD><TD>C</TD>
    </TR>
  </TABLE>
</BODY>
</HTML>

Hope that it addresses your question -if not: get back to us!

Good Luck §;O)


Jakob
 
hi dkdude refer this:
thread333-702555

Known is handfull, Unknown is worldfull
 
well i am using 1024 and i dont see any left nor top margins...

Known is handfull, Unknown is worldfull
 
Vbkris,

I am talking about the white space below the gray side (menu side)
 
set the table height to 100% (grey table)...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top