Click here to Skip to main content
16,012,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to make three text buttons in one column and three radio buttons (all in one row) and seven check buttons (also all in one row) into another column.

What I have tried:

HTML
<table>
  <tr>
    <th colspan="2">User registration</th>
  </tr>
  <tr >
    <td ><tr>
				<td></td>
				<td>Full name: <br>
					<input name="name" id="name_input" type="text" >
				</td>
			</tr>
            <tr>
                <td></td>
                <td>Email: <br>
                    <input id="email" type="email">
                </td>
            </tr> 
			<tr>
				<td></td>
				<td>City <br>
					<input name="name" id="city" type="text" >
				</td>
			</tr></td>
	</tr>
	
	<tr>
    
                <td>Ride in group? <br>
                    <label for="one">Always</label>
                    <input type="radio" id="a" name="feature" value="true">
                    <label for="two">Sometimes</label>
                    <input type="radio" id="s" name="feature" value="false" />
					<label for="two">Never</label>
                    <input type="radio" id="n" name="feature" value="false" />
					
                </td>
          </tr>
			
               
                <td>Days of the week <br>
                    <label for="one">Sun</label>
                    <input type="checkbox" id="sun" name="feature" value="true">
                    <label for="two">Mon</label>
                    <input type="checkbox" id="mon" name="feature" value="false" />
					<label for="two">Tue</label>
                    <input type="checkbox" id="tue" name="feature" value="false" />
					<label for="two">Wen</label>
                    <input type="checkbox" id="wen" name="feature" value="false" />
					<label for="two">Thu</label>
                    <input type="checkbox" id="thu" name="feature" value="false" />
					<label for="two">Fri</label>
                    <input type="checkbox" id="fri" name="feature" value="false" />
					<label for="two">Sat</label>
                    <input type="checkbox" id="sat" name="feature" value="false" />
					<button  class="inline" id="cancel" value="Cancel" style="float:right">Cancel </button>
<input type="button" class="inline" id="save"  value="Save" style="float:right">
</div></form></div>
                </td></tr>
          
  </tr>
 
</table>
Posted
Updated 17-Feb-18 1:51am

1 solution

Hi I think you need to make the tables and rows first and after you finish with that insert your labels buttons etc
Maybe something like that you are looking for:

<form action="somewhere to whatever">

<table>
 <tr>
    <th colspan="2">User registration</th>
 </tr>
 <tr>
		<td>Full name: </td>
		<td><input name="name" id="name_input" type="text"/></td>
 </tr>
 <tr>
        <td>Email: </td>
        <td><input id="email" type="text"/></td>
 </tr> 
 <tr>
		<td>City </td>
		<td><input name="name" id="city" type="text" ></td>
 </tr>
 <tr>
		<td colspan="2">Ride in group? <br/>
                    <label for="one">Always</label>
                    <input type="radio" id="a" name="feature" value="true" checked="checked"/>
                    <label for="two">Sometimes</label>
                    <input type="radio" id="s" name="feature" value="false1" />
					<label for="two">Never</label>
                    <input type="radio" id="n" name="feature" value="false2" />
		</td>
 </tr>
 <tr>
		<td colspan="2">Days of the week <br/>
                    <label for="one">Sun</label>
                    <input type="checkbox" id="sun" name="feature1" value="true"/>
                    <label for="two">Mon</label>
                    <input type="checkbox" id="mon" name="feature2" value="false" />
					<label for="two">Tue</label>
                    <input type="checkbox" id="tue" name="feature3" value="false" />
					<label for="two">Wen</label>
                    <input type="checkbox" id="wen" name="feature4" value="false" />
					<label for="two">Thu</label>
                    <input type="checkbox" id="thu" name="feature5" value="false" />
					<label for="two">Fri</label>
                    <input type="checkbox" id="fri" name="feature6" value="false" />
					<label for="two">Sat</label>
                    <input type="checkbox" id="sat" name="feature7" value="false" />
        </td>
 </tr>
 <tr>
		<td colspan="2"></td>
 </tr>
			<tr>
				<td colspan="2">
                  <button class="inline" id="Button1" value="Cancel" style="float:right">Cancel</button>
				  <button class="inline" id="save"  value="Save" style="float:right">Save</button>
                </td>
			</tr>
       
</table>

</form>
</div>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900