请熟悉table显示的大侠帮忙看一个问题

Starbucks 2005-04-30 02:06:23
下面这一段HTML代码,为什么那几个checkbox在那个文本提示以后被自动换行了?
如果必须用一个table来保存这个checkboxlist的信息,如何写可以让它不被换行?

<html>
<head></head>
<body>
<table id="tbl1" border="0" width="100%">
<tr>
<td nowrap>为什么被自动换行了?:
<table border="0">
<tr>
<td><input id="select1" type="checkbox" name="select1" /><label for="select1">ft1</label></td>
<td><input id="select2" type="checkbox" name="select2" /><label for="select2">ft2</label></td>
<td><input id="select3" type="checkbox" name="select3" /><label for="select3">ft3</label></td>
</tr>
</table>
</td>
/tr>
</table>
</body>
</html>
...全文
109 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
wangjuping 2005-05-02
  • 打赏
  • 举报
回复
style="display:inline
会是什么效果哦?
poonzsp 2005-05-01
  • 打赏
  • 举报
回复
同意楼上几位兄弟~

fanxiaoqiang 2005-05-01
  • 打赏
  • 举报
回复
弄个框架啊,把选项框 放到框架中就OK了
patchclass 2005-04-30
  • 打赏
  • 举报
回复
楼上回答不正确
错误理解楼主意思

<html>
<head></head>
<body>
<table id="tbl1" border="0" width="100%">
<tr>
<td nowrap>为什么被自动换行了?:
<table border="0" style="display:inline">
<tr>
<td><input id="select1" type="checkbox" name="select1" /><label for="select1">ft1</label></td>
<td><input id="select2" type="checkbox" name="select2" /><label for="select2">ft2</label></td>
<td><input id="select3" type="checkbox" name="select3" /><label for="select3">ft3</label></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
嵌入的table中加个style="display:inline"
bananasmiling 2005-04-30
  • 打赏
  • 举报
回复

<html>
<head></head>
<body>
<table id="tbl1" border="0" width="100%">
<table border="0"> <tr>
<td nowrap>下面这一段HTML代码,为什么那几个checkbox在那个文本提示以后被自动换行了?
如果必须用一个table来保存这个checkboxlist的信息,如何写可以让它不被换行?
为什么被自动换行了?:


<td><input id="select1" type="checkbox" name="select1" /><label for="select1">ft1</label></td>
<td><input id="select2" type="checkbox" name="select2" /><label for="select2">ft2</label></td>
<td><input id="select3" type="checkbox" name="select3" /><label for="select3">ft3</label></td>
</tr>
</table>

</table>
</body>
</html>
fengzi0924 2005-04-30
  • 打赏
  • 举报
回复
楼上解释得很对
lchuilu 2005-04-30
  • 打赏
  • 举报
回复
楼上正解。
也可这样
<html>
<head></head>
<body>
<table id="tbl1" border="0" width="400px">
<tr>
<td nowrap>
<table border="0" style="float:right; ">
<tr>
<td><input id="select1" type="checkbox" name="select1" /><label for="select1">ft1</label></td>
<td><input id="select2" type="checkbox" name="select2" /><label for="select2">ft2</label></td>
<td><input id="select3" type="checkbox" name="select3" /><label for="select3">ft3</label></td>
</tr>
</table><div id="s" style="float:left; ">为什么被自动换行了?:</div>
</td>
</tr>
</table>
</body>
</html>

61,115

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧