Link to home
Start Free TrialLog in
Avatar of m_adil
m_adil

asked on

Table problem...

I want to create a table in an HTML file starting at document position left=0, top=0. Using the following code when I crete table, it leaves a little space at top, right and left. I want that space to be covered by the table.
In other words
Table Top  =0
Table Left =0
Table width=document width

<TABLE border=1 cellPadding=1 cellSpacing=1 width=75%>
   
    <TR>
        <TD>a</TD>
        <TD></TD>
        <TD></TD></TR>
    <TR>
        <TD>c</TD>
        <TD></TD>
        <TD></TD></TR>
    <TR>
        <TD>c</TD>
        <TD></TD>
        <TD></TD></TR></TABLE>
Avatar of garrethg
garrethg

<BODY MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0" RIGHTMARGIN="0" TOPMARGIN="0" BOTTOMMARGIN="0">
will get rid of all the document padding on MSIE 4+ and most of the padding on NSN 4+

MARGINWIDTH and MARGINHEIGHT are NSN attributes.
LEFTMARGIN, RIGHTMARGIN, TOPMARGIN and BOTTOMMARGIN are MSIE attributes.

No way to get rid of it for earlier versions of these browsers and and I'm unsure of the behaviour on other types of browsers.

Note:
cellspacing > 0 on NSN will visually make the table seem further from the borders of the document as NSN only renders the table cells.
Avatar of m_adil

ASKER

Thanks. it works fine. Plz make it an answer
ASKER CERTIFIED SOLUTION
Avatar of garrethg
garrethg

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial