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 8742509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:30:58+00:00 2026-06-13T11:30:58+00:00

I searched for this issue but can’t find it… my problem is with this

  • 0

I searched for this issue but can’t find it… my problem is with this radiobuttonlist that I am trying to align along with its label, but keep getting this.

enter image description here

as you can see the buttonlist has that fixed width that I just cannot change.. the red circle is where I wanna align the radio buttons. I tried to textalign=”right” but it overlaps to second line due to that wide space before names(dr. mr…) like this… As you can see the width is fixed…
enter image description here

Below is my code… any ideas how to fix this silly problem??? thanks

<div style="padding:5px;"><label>Prefix *</label>
<asp:RadioButtonList id="Prefix" runat="server" TextAlign="Left" RepeatDirection="Vertical">
    <asp:listitem id="Dr" runat="server" >Dr.</asp:listitem>
    <asp:listitem id="Mr" runat="server" >Mr.</asp:listitem>
    <asp:listitem id="Mrs" runat="server" >Mrs.</asp:listitem>
    <asp:listitem id="Miss" runat="server" >Miss</asp:listitem>
    <asp:listitem id="Ms" runat="server" >Ms.</asp:listitem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server"
       ControlToValidate="Prefix"
       ErrorMessage="Prefix is required."
       ForeColor="Red">
    </asp:RequiredFieldValidator></div>

UPDATE –

I have the following css that is suppose to align all the labels like the “Prefix *”… so why is it affecting radiobuttons… and is there some kind of override to fix it?

 label
    {
        width: 20em;
        float: left;
        text-align: right;
        margin-right: 0.5em;
        display: block;
        color: Black;
     }
  • 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-13T11:30:59+00:00Added an answer on June 13, 2026 at 11:30 am

    Assign an class name to the radiobutton list

    <asp:RadioButtonList id="Prefix" runat="server" CssClass="radioButtonList" RepeatDirection="Vertical">
        <asp:listitem Value="Dr">Dr.</asp:listitem>
        <asp:listitem Value="Mr">Mr.</asp:listitem>
        <asp:listitem Value="Mrs">Mrs.</asp:listitem>
        <asp:listitem Value="Miss">Miss</asp:listitem>
        <asp:listitem Value="Ms">Ms.</asp:listitem>
    </asp:RadioButtonList>
    

    And use the following CSS

    .radioButtonList input
     {    
          float: left;
     }
    
     .radioButtonList label
     {    
          margin-left: 10px;
          display: block;
          text-align: left;
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched on google about this issue and I can't find something that
I searched the other posts that had this issue and could not find one
I've searched Google and this website many times, but can not find a solution
I searched lot about this topics but can't find a proper solution. I am
I tried Google this issue and was searched over an hour on Stackoverflow, but
I have searched for this but nobody have the same issue.. Now I need
I searched for this question in various places, but all that they mention is
I've searched around for an example that matches my use case but cannot find
I've searched and read (not just on SO) but can't seem to find a
I searched internet and SO but could not get solution to this issue. I

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.