【发布时间】:2014-05-30 08:04:29
【问题描述】:
<table class="layout-table">
<tr>
<td><strong>3. Has the person completed all required training within the past three years?</strong><br/><br/></td>
</tr>
<tr>
<td><strong>a. Copy of It</strong>
<p:selectOneRadio id="radio3" value="#{question3a}">
<f:selectItem itemLabel="Yes" itemValue="0" />   
<f:selectItem itemLabel="No" itemValue="1" />   
<f:selectItem itemLabel="NA" itemValue="2" />   
</p:selectOneRadio>
<br/>
<h:outputText id="counter3" />
</td>
</tr>
</table>
我想做的是让一张桌子看起来像这样
3. Has the person completed all required training within the past three years?
a. Copy of It Yes [] No[] NA[]
b. (another one) Yes [] No[] NA[]
我不知道如何对 a 和 b 进行制表符,而且如果我将其设置在按钮位于列右侧的位置,那么它将一直间隔到最右侧,我不知道为什么.. ..这可能没有CSS吗?如果没有,那么 CSS 也可以。感谢您的帮助!
【问题讨论】:
-
这看起来像是 ordered list 的工作,而不是表格。
-
嵌套有序列表,不少于;它绝对类似于一些非表格信息。
-
@DavidThomas 是的,你是对的,嵌套有序列表是要走的路
-
是的,表格是很棘手的事情,对于某些事情来说非常方便,例如在页面上仅使用 css 将某些东西居中。但是对于其他事情,比如你想要的,你最好使用上面建议的其他东西。你不能缩进表格的一部分;表格始终是由行和单元格组成的网格。另一件事是表格总是缩放以适应其中的内容。方便如前所述的居中,但如果您正在寻找像标签这样的自定义布局..
-
好的,谢谢大家!我猜桌子不是这样的:P。谢谢!!!