Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8171189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:23:09+00:00 2026-06-06T21:23:09+00:00

How do i have the radio button show one below the other like this?

  • 0

How do i have the radio button show one below the other like this?

                 Sex                 (button)Male
                                     (button) Female

Whatever i do, i get like this

                   Sex                 (button)Male
                   (button) Female

how do i do the margin left of the second radio button so that it is right below the first one?

            <label for="Sex">Sex:</label>
            <asp:RadioButton ID="male" runat="server" GroupName="gender" 
                    Text="Male"/>
            <br/>

            <asp:RadioButton ID="female" runat="server" GroupName="gender" Text="Female"/>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:23:12+00:00Added an answer on June 6, 2026 at 9:23 pm

    You need to either group the items in side-by-side divs, or add additional spacing to align the second item.

    floated divs:

    <div style="float: left;">
           <span>Sex:</label>
    </div>
    <div style="float: left;">
        <asp:RadioButton ID="male" runat="server" GroupName="gender" Text="Male"/>
        <br/>
        <asp:RadioButton ID="female" runat="server" GroupName="gender" Text="Female"/>        
    </div>
    <div style="clear: both"></div>
    

    or with padding:

    <style>
        .radioButtonPadding {
            display: inline-block;
            width: 45px;
        }
    </style>
    
    <span class="radioButtonPadding">Sex:</label>
    <asp:RadioButton ID="male" runat="server" GroupName="gender" Text="Male"/>
    <br/>
    <span class="radioButtonPadding">&nbsp;</label>
    <asp:RadioButton ID="female" runat="server" GroupName="gender" Text="Female"/>
    

    You can also do it as a RadioButtonList

    <style>
        .genderLabel {
            float: left;
            display: block;
        }
        .genderList {
            float: left;
        }
        .clear {
            clear: both;
        }
    </style>
    
    <asp:Label id="genderLabel" runat="server" CssClass="genderLabel"       
        Text="Sex:" AssociatedControlID="genderList"/>
    <asp:RadioButtonList id="genderList" runat="server" CssClass="genderList">
       <asp:ListItem>Male</asp:ListItem>
       <asp:ListItem>Female</asp:ListItem>
    </asp:RadioButtonList>
    <div class="clear"></div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 radio button with 2 group. The structure is like this Main
i have taken one radio button as GPS. now i want to show my
I have a form which contains rows like this one. I need to be
this may be a weird question but I have several radio button groups with
I have two tables. I want to show one table when the first radio
I have this markup one of my web pages, <div class=radio-spoof> <input type=radio name=enquiry
I have 3 radio buttons which hide/show some div's. The radio buttons are getting
I have a radio button list and some of the labels are quite long
I have 2 radio button with values New & Existing. If user chooses New,
I have a radio button control adaptor that attempts to render the radio button

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.