Search code examples
htmlcssasp.netradiobuttonlist

not able to align radiobuttonlist


I am not able to align radiobutton list to left of label above. Here is code

  <div style="border-radius: 10px;">
        <div style="margin-bottom: 10px"></div>
        <asp:Panel ID="panel" runat="server">
            <div style="padding-left: 10px" >
                <asp:Label ID="lbl" runat="server" Text="Select criteria" />
                <asp:RadioButtonList ID="radio" runat="server" AutoPostBack="True" OnSelectedIndexChanged="radio_SelectedIndexChanged" RepeatDirection="Horizontal"   />
                <asp:Label ID="lbl1" runat="server" Text="Value"></asp:Label>
                <br />
                <asp:TextBox ID="txt" runat="server"></asp:TextBox>
                <asp:Label ID="ScoreMethodLabel" runat="server" Text="Score"></asp:Label>
                <asp:DropDownList ID="dropscore" runat="server" />&nbsp;
            </div>

        </asp:Panel>
        <br/>
    </div>

Here is output i see

enter image description here

you see the option button is not aligned exaxctly below text called "Select criteria"


Solution

  • try to margin:0

    * {
       margin: 0;
       }
    
    input[type=radio] {
            margin: 0;
       }