RadioButtonList

Discussion in 'ASP .Net' started by dancer, Aug 3, 2007.

  1. dancer

    dancer Guest

    How can I get the buttons to appear on the same line as the question? No
    matter what I do buttons appear on the NEXT line.

    Are you at least 18 years of age?
    <asp:RadioButtonList id="Eighteen"
    RepeatDirection="horizontal" Runat=server>
    <asp:ListItem><font face="Verdana"
    Size="2">Yes</asp:ListItem>
    <asp:ListItem><font face="Verdana"
    Size="2">No</asp:ListItem> </asp:RadioButtonList><br>
     
    dancer, Aug 3, 2007
    #1
    1. Advertising

  2. On Aug 3, 11:48 pm, "dancer" <> wrote:
    > How can I get the buttons to appear on the same line as the question? No
    > matter what I do buttons appear on the NEXT line.
    >
    > Are you at least 18 years of age?
    > <asp:RadioButtonList id="Eighteen"
    > RepeatDirection="horizontal" Runat=server>
    > <asp:ListItem><font face="Verdana"
    > Size="2">Yes</asp:ListItem>
    > <asp:ListItem><font face="Verdana"
    > Size="2">No</asp:ListItem> </asp:RadioButtonList><br>


    you can add your code to a table

    <table>
    <tr>
    <td>
    Are you at least 18 years of age?
    </td>
    <td>
    <asp:RadioButtonList id="Eighteen"
    RepeatDirection="horizontal" Runat=server>
    <asp:ListItem><font face="Verdana"
    Size="2">Yes</asp:ListItem>
    <asp:ListItem><font face="Verdana"
    Size="2">No</asp:ListItem> </asp:RadioButtonList>
    </td>
    </table>

    The control is created in <DIV> and it makes a new line by default
     
    Alexey Smirnov, Aug 3, 2007
    #2
    1. Advertising

  3. On Aug 4, 12:28 am, Alexey Smirnov <> wrote:
    > On Aug 3, 11:48 pm, "dancer" <> wrote:
    >
    > > How can I get the buttons to appear on the same line as the question? No
    > > matter what I do buttons appear on the NEXT line.

    >
    > > Are you at least 18 years of age?
    > > <asp:RadioButtonList id="Eighteen"
    > > RepeatDirection="horizontal" Runat=server>
    > > <asp:ListItem><font face="Verdana"
    > > Size="2">Yes</asp:ListItem>
    > > <asp:ListItem><font face="Verdana"
    > > Size="2">No</asp:ListItem> </asp:RadioButtonList><br>

    >
    > you can add your code to a table
    >
    > <table>
    > <tr>
    > <td>
    > Are you at least 18 years of age?
    > </td>
    > <td>
    > <asp:RadioButtonList id="Eighteen"
    > RepeatDirection="horizontal" Runat=server>
    > <asp:ListItem><font face="Verdana"
    > Size="2">Yes</asp:ListItem>
    > <asp:ListItem><font face="Verdana"
    > Size="2">No</asp:ListItem> </asp:RadioButtonList>
    > </td>
    > </table>
    >
    > The control is created in <DIV> and it makes a new line by default


    I was wrong, it creates a table aroud a RadioButtonList...

    another option then, you can simply add

    <div style="float:left">Are you at least 18 years of age?</div>

    It also should make a text and a buttons in one line
     
    Alexey Smirnov, Aug 3, 2007
    #3
  4. dancer

    dancer Guest

    That worked. Thank you. I wonder why the buttons do not line up with the
    MIDDLE of the text, instead of appearing slightly lower than the text?


    "Alexey Smirnov" <> wrote in message
    news:...
    > On Aug 4, 12:28 am, Alexey Smirnov <> wrote:
    >> On Aug 3, 11:48 pm, "dancer" <> wrote:
    >>
    >> > How can I get the buttons to appear on the same line as the question?
    >> > No
    >> > matter what I do buttons appear on the NEXT line.

    >>
    >> > Are you at least 18 years of age?
    >> > <asp:RadioButtonList id="Eighteen"
    >> > RepeatDirection="horizontal" Runat=server>
    >> > <asp:ListItem><font face="Verdana"
    >> > Size="2">Yes</asp:ListItem>
    >> > <asp:ListItem><font face="Verdana"
    >> > Size="2">No</asp:ListItem> </asp:RadioButtonList><br>

    >>
    >> you can add your code to a table
    >>
    >> <table>
    >> <tr>
    >> <td>
    >> Are you at least 18 years of age?
    >> </td>
    >> <td>
    >> <asp:RadioButtonList id="Eighteen"
    >> RepeatDirection="horizontal" Runat=server>
    >> <asp:ListItem><font face="Verdana"
    >> Size="2">Yes</asp:ListItem>
    >> <asp:ListItem><font face="Verdana"
    >> Size="2">No</asp:ListItem> </asp:RadioButtonList>
    >> </td>
    >> </table>
    >>
    >> The control is created in <DIV> and it makes a new line by default

    >
    > I was wrong, it creates a table aroud a RadioButtonList...
    >
    > another option then, you can simply add
    >
    > <div style="float:left">Are you at least 18 years of age?</div>
    >
    > It also should make a text and a buttons in one line
    >
     
    dancer, Aug 6, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron
    Replies:
    2
    Views:
    781
    Sreejumon[MVP]
    Jul 1, 2003
  2. Leif
    Replies:
    1
    Views:
    427
    Helixpoint
    Jul 11, 2003
  3. Bob Hoke
    Replies:
    0
    Views:
    483
    Bob Hoke
    Jul 11, 2003
  4. Hazzard
    Replies:
    3
    Views:
    5,063
    Hazzard
    Jul 14, 2003
  5. Mike S
    Replies:
    1
    Views:
    1,085
    Mike S
    Jul 15, 2003
Loading...

Share This Page