2013-01-19 37 views
0

我面临的问题对齐的复选框中的一些具体原因,表格单元格如何将复选框与表格单元格中的文本居中?

<table style="empty-cells:hide;" border="1" cellpadding="1" cellspacing="1"> 

<tr> 
    <td valign="top"> 
     test 1 - 
     <input type="checkbox" name="query_myTextEditBox">  
     test 2 - 
     myTextEditBox 
     <select size ="3" name="myTextEditBox_compare_operator"> 
      <option value="1">option 1</option> 
      <option value="2">option 2</option> 
     </select> 
    </td> 

    <td valign="top"> 
     <input type="text" value="my text" name="myTextEditBox"> 
    </td> 

</tr> 

my test on jsfiddle.net

,我不想&复选框分隔文本到2个细胞

我没有看到这个帖子How to center a checkbox in a table cell?但它不为我工作。

+0

是你想这样http://jsfiddle.net/gSaPb/还是怎么样? – KarSho

回答

0

添加style="vertical-align:top"<select>元素。

+0

它几乎工作。看到这里http://jsfiddle.net/dsea/QCr3a/4/。我想知道第一名是否可以像第二名那样排列?感谢 – dsea

+0

我说把它添加到了'';) –

+0

是的,我的作品。 (并非常抱歉误解) – dsea

相关问题