Home All Groups Group Topic Archive Search About

ASP.Net 2.0 Table not expanding 100%

Author
22 Feb 2006 11:33 PM
Chuck Snyder
I'm trying to get a table to expand to fill the top of the page.  But its
leaving a margin on all sides (at least top, left and right).  Can anyone see
what I'm doing wrong???
<body>
    <form id="form1" runat="server"  style="left: 0px; position: absolute;
top: 0px; padding:0,0,0,0;">

    <div style="margin:0,0,0,0">
<div class="Title" id="Banner" style="margin:0,0,0,0; width:103.1%; 
padding:0,0,0,0;" >
            <table  width="100%" cellspacing="0">
                <tr id="NavBarTop" style="height:3px">
                    <td style="width:100%"></td>
                </tr>
            </table>
            <table cellspacing="0" width="100%" id="Header"
style="display:block;  padding:0,0,0,0;" cellpadding="0">
               <tr>
                  <td style="width:1%; height: 37px;"></td>
                  <td align="left" valign="top" style="height: 37px">
                      <asp:Label ID="Label1" runat="server" Text="Some"
ForeColor="black"></asp:Label></td>
                  <td align="left" style="height: 37px">   
                      <asp:Image ID="Image1" runat="server"
ImageUrl="file:///H:/wwwroot/images/PTB_Blacklogo.jpg" /> </td>
                  <td  id="BannerTitle" class="Banner" style="width:100%;
height: 37px"> Pioneer Trust Bank N.A.</td>
                  <td align="right" style="height: 37px">
                        <table width="100%" cellspacing="0">
                            <tr>
                                <td class="Title" align="right"></td>
                            </tr>
                        </table>
                  </td>
                  <td width:1%; height: 37px"></td>
                 </tr>
            </table>

Author
23 Feb 2006 12:05 AM
Phillip Williams
Remove the style from the Form and the 2 Div tags and Try this instead:
<body style="margin:0;">


Show quoteHide quote
"Chuck Snyder" wrote:

> I'm trying to get a table to expand to fill the top of the page.  But its
> leaving a margin on all sides (at least top, left and right).  Can anyone see
> what I'm doing wrong???
> <body>
>     <form id="form1" runat="server"  style="left: 0px; position: absolute;
> top: 0px; padding:0,0,0,0;">
>  
>     <div style="margin:0,0,0,0">
> <div class="Title" id="Banner" style="margin:0,0,0,0; width:103.1%; 
> padding:0,0,0,0;" >
>             <table  width="100%" cellspacing="0">
>                 <tr id="NavBarTop" style="height:3px">
>                     <td style="width:100%"></td>
>                 </tr>
>             </table>
>             <table cellspacing="0" width="100%" id="Header"
> style="display:block;  padding:0,0,0,0;" cellpadding="0">
>                <tr>
>                   <td style="width:1%; height: 37px;"></td>
>                   <td align="left" valign="top" style="height: 37px">
>                       <asp:Label ID="Label1" runat="server" Text="Some"
> ForeColor="black"></asp:Label></td>
>                   <td align="left" style="height: 37px">   
>                       <asp:Image ID="Image1" runat="server"
> ImageUrl="file:///H:/wwwroot/images/PTB_Blacklogo.jpg" /> </td>
>                   <td  id="BannerTitle" class="Banner" style="width:100%;
> height: 37px"> Pioneer Trust Bank N.A.</td>
>                   <td align="right" style="height: 37px">
>                         <table width="100%" cellspacing="0">
>                             <tr>
>                                 <td class="Title" align="right"></td>
>                             </tr>
>                         </table>
>                   </td>
>                   <td width:1%; height: 37px"></td>
>                  </tr>
>             </table>
Author
23 Feb 2006 3:49 PM
Chuck Snyder
Thanks.  I think that must have been the only thing I didn't try.

Show quoteHide quote
"Phillip Williams" wrote:

> Remove the style from the Form and the 2 Div tags and Try this instead:
> <body style="margin:0;">
>
>
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
>
> "Chuck Snyder" wrote:
>
> > I'm trying to get a table to expand to fill the top of the page.  But its
> > leaving a margin on all sides (at least top, left and right).  Can anyone see
> > what I'm doing wrong???
> > <body>
> >     <form id="form1" runat="server"  style="left: 0px; position: absolute;
> > top: 0px; padding:0,0,0,0;">
> >  
> >     <div style="margin:0,0,0,0">
> > <div class="Title" id="Banner" style="margin:0,0,0,0; width:103.1%; 
> > padding:0,0,0,0;" >
> >             <table  width="100%" cellspacing="0">
> >                 <tr id="NavBarTop" style="height:3px">
> >                     <td style="width:100%"></td>
> >                 </tr>
> >             </table>
> >             <table cellspacing="0" width="100%" id="Header"
> > style="display:block;  padding:0,0,0,0;" cellpadding="0">
> >                <tr>
> >                   <td style="width:1%; height: 37px;"></td>
> >                   <td align="left" valign="top" style="height: 37px">
> >                       <asp:Label ID="Label1" runat="server" Text="Some"
> > ForeColor="black"></asp:Label></td>
> >                   <td align="left" style="height: 37px">   
> >                       <asp:Image ID="Image1" runat="server"
> > ImageUrl="file:///H:/wwwroot/images/PTB_Blacklogo.jpg" /> </td>
> >                   <td  id="BannerTitle" class="Banner" style="width:100%;
> > height: 37px"> Pioneer Trust Bank N.A.</td>
> >                   <td align="right" style="height: 37px">
> >                         <table width="100%" cellspacing="0">
> >                             <tr>
> >                                 <td class="Title" align="right"></td>
> >                             </tr>
> >                         </table>
> >                   </td>
> >                   <td width:1%; height: 37px"></td>
> >                  </tr>
> >             </table>
Author
23 Feb 2006 3:24 PM
Patrice
Likely the margin for the body tag that you'll have then to set to 0. If you
want this for the whole site you could also use a global CSS stylesheet...

--
Patrice

Show quoteHide quote
"Chuck Snyder" <ChuckSny***@discussions.microsoft.com> a écrit dans le
message de news:BCADB9F1-6F09-4B4F-84D9-FDA6D208E136@microsoft.com...
> I'm trying to get a table to expand to fill the top of the page.  But its
> leaving a margin on all sides (at least top, left and right).  Can anyone
see
> what I'm doing wrong???
> <body>
>     <form id="form1" runat="server"  style="left: 0px; position: absolute;
> top: 0px; padding:0,0,0,0;">
>
>     <div style="margin:0,0,0,0">
> <div class="Title" id="Banner" style="margin:0,0,0,0; width:103.1%;
> padding:0,0,0,0;" >
>             <table  width="100%" cellspacing="0">
>                 <tr id="NavBarTop" style="height:3px">
>                     <td style="width:100%"></td>
>                 </tr>
>             </table>
>             <table cellspacing="0" width="100%" id="Header"
> style="display:block;  padding:0,0,0,0;" cellpadding="0">
>                <tr>
>                   <td style="width:1%; height: 37px;"></td>
>                   <td align="left" valign="top" style="height: 37px">
>                       <asp:Label ID="Label1" runat="server" Text="Some"
> ForeColor="black"></asp:Label></td>
>                   <td align="left" style="height: 37px">
>                       <asp:Image ID="Image1" runat="server"
> ImageUrl="file:///H:/wwwroot/images/PTB_Blacklogo.jpg" /> </td>
>                   <td  id="BannerTitle" class="Banner" style="width:100%;
> height: 37px"> Pioneer Trust Bank N.A.</td>
>                   <td align="right" style="height: 37px">
>                         <table width="100%" cellspacing="0">
>                             <tr>
>                                 <td class="Title" align="right"></td>
>                             </tr>
>                         </table>
>                   </td>
>                   <td width:1%; height: 37px"></td>
>                  </tr>
>             </table>