Search code examples
c#asp.nethtmlalignment

How To Give a Space between Label and Textbox in Different <td> tag In A Row C# Web App?


i am trying to give a two digit space between label and textbox both are in different td tag in a row of table such that label is right align and textbox is left align so they come close and i want to give two digit space between then rather then alin then middle ?? my code below,

<table>
 <tr>
            <td align="right" class="style5">
                <asp:Label ID="Label2" runat="server" Text="Link:" ForeColor="Black" ></asp:Label>
            </td>
            <td class="style5">
                <asp:TextBox ID="Link" runat="server"> </asp:TextBox>
            </td>
        </tr>
</table>

i am using : to give space between these two controls but i do not want to use : instead then what is the solution

Hopes for Your Suggestions..


Solution

  • Use CSS:

    td.style5 { padding-right: 1em; }