2013-01-19 44 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

相關問題