Add a small space between tables

199 views Asked by At

What I want to do is add a small space between my tables. When I use <p> or <br> the space is too big. Does anyone know how to make a really small space between tables?

Here's what it actually looks like versus what I want it to look like:

Example

I'm doing this inside an ASP:Panel and a Repeater Control.

Here's my code:

<asp:Repeater ID="AcctRepeater" runat="server" onitemcommand="AcctRepeater_ItemCommand" OnItemDataBound="AcctRepeater_DataBinding">

  <HeaderTemplate>  
  </HeaderTemplate> 

  <ItemTemplate>
    <asp:Panel ID="Panel3" runat="server" BackColor="#ffffff" Height="125px" Style="margin-left: 1px" Width="800px" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px">            
      <table width="790">
        <tr bgcolor="#007ACC" style="color:White">
          <td width="100">Account Number</td><td width="80">DOS</td><td width="30">Active</td><td width="240">Account Group</td><td width="180">Function</td>
        </tr>
        <tr>
          <td> 
            <asp:Label ID="lblAcctNum" runat="server" width="200px" Text='<%#Eval("UserName") %>'></asp:Label>
          </td>
          <td>
            <asp:Label ID="lblDOS" runat="server" Text='<%#Eval("UserDOB", "{0:d}") %>'></asp:Label>
          </td>
          <td> 
            <asp:Label ID="lblActive" runat="server" width="30px" Text='<%#Eval("UserTitle") %>'></asp:Label>
          </td>
          <td>
            <asp:Label ID="lblAcctGrp" runat="server" Text='<%#Eval("UserCity") %>'></asp:Label>
          </td>
          <td>
            <!--     <asp:LinkButton ID="LinkEdit" runat="server" CommandArgument='<%#Eval("UserImg") %>' CommandName="edit">Edit</asp:LinkButton>  -->
          </td>
        <tr>
        <tr>
          <td colspan = "2">
            <asp:Label ID="Label1" runat="server" Text='Added/Loaded By: '></asp:Label><asp:Label ID="lblLoadBy" runat="server" Text='<%#Eval("UserState") %>'></asp:Label>
          </td>
          <td  colspan ="3">
            <asp:Label ID="Label3" runat="server" Text='Added/Loaded On: '></asp:Label><asp:Label ID="lblLoadedOn" runat="server" Text='<%#Eval("UserGender") %>'></asp:Label>
          </td>
        </tr>   
      </table>
    </asp:Panel>
  </ItemTemplate>

  <SeparatorTemplate>  
  </SeparatorTemplate>

  <FooterTemplate>
  </FooterTemplate>

</asp:Repeater>
2

There are 2 answers

1
AngularRat On BEST ANSWER

You can change your Panel to include a bottom margin. SO change:

<asp:Panel ID="Panel3" runat="server" BackColor="#ffffff" Height="125px" Style="margin-left: 1px" Width="800px" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px">            

to

    <asp:Panel ID="Panel3" runat="server" BackColor="#ffffff" Height="125px" Style="margin-left: 1px;margin-bottom: 2px" Width="800px" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px">            
2
epascarello On

Set the bottom margin of the table Panel .