Solved

Radio buttons inside table cell

Posted on 2004-10-08
14
142 Views
Last Modified: 2010-04-09
I have a 1x1 table and I ned to have two radio buttons next to each other; male, female. I can't figure out how to get the second one. Also, is there away to get tables  to grow vertical?

Thanks much
0
Comment
Question by:6784
14 Comments
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 100 total points
ID: 12261090
something like:

<form name="form1" method="post" action="">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td> <input type="radio" name="gender" value="male">
        Male
        <input type="radio" name="gender" value="female">
        Female </td>
    </tr>
  </table>  
</form>

?
0
 
LVL 30

Expert Comment

by:VirusMinus
ID: 12261091
<table>
<tr>
    <td><input type="radio" name="sex" option value="1" checked>male</td><td><input type="radio" name="sex" option value="2">female</td>
</tr>
</table>

the table will grow vertically on its own if you put in more content and set a fixed height
0
 
LVL 33

Expert Comment

by:snoyes_jw
ID: 12261095
<input type="radio" name="gender" value="male">
<input type="radio" name="gender" value="female">

To grow vertically, add content or use CSS to specify a fixed height.
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12261107
What do you mean you can't figure out how to get the second one?

<form name="the_form" action="somepage.html" method="post">
<table><tr>
<td nowrap>
<input type="radio" name="sex" value="m">Male
<input type="radio" name="sex" value="f">Female<br>
</td>
</tr></table>
</form>
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12261110
Whoa.  I ride the short bus.
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 12261162
Lose the table.

<fieldset>
      <legend>My Form</legend>
      <input type="radio"> Yes
      <input type="radio"> No
</fieldset>

Sean
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12261180
Sean always gets all css-world on us.

:)
0
 
LVL 33

Expert Comment

by:snoyes_jw
ID: 12261311
Cool, let's rumble: http:Q_21077427.html#11685530
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12261446
LOL!!!!
0
 
LVL 33

Expert Comment

by:snoyes_jw
ID: 12278809
@6784: EE policy is to accept the FIRST correct answer. ryancys was the first to post.  Please post in Community Support and ask a moderator to reopen this question so you can accept ryancys' answer.
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12278868
I wonder why I was the chosen one...
only diff. was the nowrap in there.
?
0
 
LVL 33

Expert Comment

by:snoyes_jw
ID: 12278927
@6784: If the "nowrap" was the key to your problem, then cLFlaVA's post is the first answer and can stand as is.  Otherwise, ryancys probably deserves the points.
0
 

Author Comment

by:6784
ID: 12279030
Sorry, didn't mean to break EE policy. I will take care of this matter right away.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now