简体   繁体   中英

Html Alignment in .aspx page

Hi I am not good in Html alignment. Can you please help me. I want make some space between two button (add, cancel button).(Please see the image) I tried ti fix it but no luck. Please help me. see the image link( http://i.stack.imgur.com/7M9sE.jpg )

<table style="background-color: #F5F5E9" cellspacing="2">
<tr>
    <td align="left" style="width: 70px;">
        Note Type
    </td>
    <td align="left" style="width: 82px; height: 24px;">
        <telerik:RadComboBox ID="RadComboBox1" EmptyMessage="Please select" runat="server"
            MarkFirstMatch="True" CollapseDelay="0" Width="115px" DropDownWidth="100px" AllowCustomText="True">
            <CollapseAnimation Duration="0" />
        </telerik:RadComboBox>
        <asp:RequiredFieldValidator InitialValue="" ValidationGroup="Notes" ID="RequiredFieldValidator1"
            runat="server" ControlToValidate="ddlNoteType" ClientValidationFunction="ddlNt"
            Display="None" ErrorMessage="Please select Note Type."></asp:RequiredFieldValidator>
        <cc2:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" TargetControlID="custValCou"
            runat="server" Enabled="True">
        </cc2:ValidatorCalloutExtender>
    </td>
    <td>
    </td>
</tr>
<tr>
    <td align="left" valign="middle" style="width: 70px;">
        Notes
    </td>
    <td align="left">
        <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Rows="3" Width="570px"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ValidationGroup="Notes"
            ControlToValidate="txtNoteDesc" Display="None" runat="server" ErrorMessage="Please enter Notes."></asp:RequiredFieldValidator>
        <cc2:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" TargetControlID="valCliID"
            runat="server">
        </cc2:ValidatorCalloutExtender>
        &nbsp;&nbsp;
    </td>
    <td>
        <span style="padding-bottom: 4px;">
            <asp:Button ID="Button1" Width="60px" OnClick="btnAddNote_Click" ValidationGroup="Notes"
                runat="server" Text="Add" /></span>
        <asp:Button ID="Button2" Width="60px" runat="server" OnClientClick="return  hideAddNotes()"
            Text="Cancel" />
    </td>
</tr>

instead of:

<span style="padding-bottom: 4px;">

use:

<div style="padding-bottom: 4px;">

You could also add a break tag in between your buttons:

<asp:Button ID="Button1" Width="60px" OnClick="btnAddNote_Click"
   ValidationGroup="Notes" runat="server" Text="Add" /></span>
<br />
<asp:Button ID="Button2" Width="60px" runat="server"
   OnClientClick="return hideAddNotes()" Text="Cancel" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM