如何使用单独的列创建表 [英] How to create table with separate columns
本文介绍了如何使用单独的列创建表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将一列中的三个文本按钮和三个单选按钮(全部在一行中)和七个检查按钮(也在一行中)放到另一列中。
我的尝试:
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:
<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>
推荐答案
嗨
我认为你需要先制作表格和行在你完成插入你的标签按钮等
也许是这样的您正在寻找:
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>
这篇关于如何使用单独的列创建表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文