HTML缩进表 [英] HTML indent table

查看:112
本文介绍了HTML缩进表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

    <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" />&#160;&#160;&#160;
                <f:selectItem itemLabel="No" itemValue="1" />&#160;&#160;&#160;
                <f:selectItem itemLabel="NA" itemValue="2" />&#160;&#160;&#160;
            </p:selectOneRadio>
            <br/>
            <h:outputText id="counter3" />
        </td>
    </tr>
  </table>

我试图做的是得到一张像这样的表格

What I am trying to do is get a table to look like this

   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也可以。感谢您的帮助!

I dont know how to tab the a and b and also if I make it where the buttons are to the right of the columns then it spaces it all the way to the very right hand side and I am not sure why.... Is this possible to do without CSS? If not then CSS would be fine too. Thanks for the help!

推荐答案

您可能需要标记它,看起来像这样。我同意表格可能不是这个问题的最佳解决方案。

You might want to mark it up so it looks like this. I do agree that tables probably aren't the best solution for this problem.

<table class="layout-table">
   <tr>
      <td><strong>3. Has the person completed all required training within the past three years?</strong> 
   </tr>
   <tr>
      <td>
         <table width="600" cellpadding="0" cellspacing="0" border="0" style="margin: 0 auto;">
            <tr>
               <td>
                  <p:selectOneRadio id="radio3" value="#{question3a}">
                     <f:selectItem itemLabel="Yes" itemValue="0" />&#160;&#160;&#160;
                     <f:selectItem itemLabel="No" itemValue="1" />&#160;&#160;&#160;
                     <f:selectItem itemLabel="NA" itemValue="2" />&#160;&#160;&#160;
                  </p:selectOneRadio>
               </td>
            </tr>
            <tr>
               <td>
                  <p:selectOneRadio id="radio3" value="#{question3a}">
                     <f:selectItem itemLabel="Yes" itemValue="0" />&#160;&#160;&#160;
                     <f:selectItem itemLabel="No" itemValue="1" />&#160;&#160;&#160;
                     <f:selectItem itemLabel="NA" itemValue="2" />&#160;&#160;&#160;
                  </p:selectOneRadio>
               </td>
            </tr>
         </table>
      </td>
   </tr>
</table>

这篇关于HTML缩进表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆