HTML - 两个水平并排的表 [英] HTML — Two Tables Horizontally Side by Side
本文介绍了HTML - 两个水平并排的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< tr>
< th>
< span onclick =toggleDiv('favData','favDataImg')style =cursor:hand;>收藏夹< img name =favDataImgsrc =../ images / minus。 gif/>< / span>
< / th>
< / tr>
< tr>
< td style =width:300px; text-align:left; padding-right:30px;>
< div id =favDatastyle =display:block;>
< fieldset style =width:240px;>
< legend>收藏夹< / legend>
< table border =0align =left>
< input type =radioname =publicRadiovalue =Public> Public:< / input>
< select name =publicDropDown>
< option value =Public Dropdownselected =selected>公开下拉菜单< / option>
< / select>
< br>< br>
< input type =radioname =userRadiovalue =User> User:< / input>
< select name =userDropDown>
< option value =User Dropdownselected =selected>用户下拉菜单< / option>
< / select>
< br>< br>
< input type =radioname =customRadiovalue =Custom>自定义:< / input>
< / table>
< / fieldset>
< fieldset style =width:240px;>
< legend>收藏夹< / legend>
< table border =0align =left>
< input type =radioname =publicRadiovalue =Public> Public:< / input>
< select name =publicDropDown>
< option value =Public Dropdownselected =selected>公开下拉菜单< / option>
< / select>
< br>< br>
< input type =radioname =userRadiovalue =User> User:< / input>
< select name =userDropDown>
< option value =User Dropdownselected =selected>用户下拉菜单< / option>
< / select>
< br>< br>
< input type =radioname =customRadiovalue =Custom>自定义:< / input>
< / table>
< / fieldset>
< / div>
< / td>
< / tr>
解决方案
我想你缺少几行HTML从你的复制和粘贴的开始,然而你想做的是添加 float:left
到第一个字段集的CSS。
It's me again. I'm trying to get tables next to each other horizontally, but this is what I got. I'm not sure why the code is not indented??... Thanks
<tr>
<th>
<span onclick="toggleDiv('favData', 'favDataImg')" style="cursor: hand;">Favorites <img name="favDataImg" src="../images/minus.gif" /></span>
</th>
</tr>
<tr>
<td style="width: 300px; text-align: left; padding-right: 30px;">
<div id="favData" style="display: block;">
<fieldset style="width: 240px;">
<legend>Favorites</legend>
<table border="0" align="left">
<input type="radio" name="publicRadio" value="Public" >Public: </input>
<select name="publicDropDown">
<option value="Public Dropdown" selected="selected">Public Dropdown</option>
</select>
<br><br>
<input type="radio" name="userRadio" value="User" >User: </input>
<select name="userDropDown">
<option value="User Dropdown" selected="selected">User Dropdown</option>
</select>
<br><br>
<input type="radio" name="customRadio" value="Custom" >Custom: </input>
</table>
</fieldset>
<fieldset style="width: 240px;">
<legend>Favorites</legend>
<table border="0" align="left">
<input type="radio" name="publicRadio" value="Public" >Public: </input>
<select name="publicDropDown">
<option value="Public Dropdown" selected="selected">Public Dropdown</option>
</select>
<br><br>
<input type="radio" name="userRadio" value="User" >User: </input>
<select name="userDropDown">
<option value="User Dropdown" selected="selected">User Dropdown</option>
</select>
<br><br>
<input type="radio" name="customRadio" value="Custom" >Custom: </input>
</table>
</fieldset>
</div>
</td>
</tr>
解决方案
I think you're missing a few lines of HTML from the start of your copy and paste, however what you'll want to do is add a float:left
to the CSS of the first fieldset.
这篇关于HTML - 两个水平并排的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文