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

에있는 체크 박스를 정렬하는 문제에 직면하고, 나는이 세포

에 텍스트를 & 체크 박스를 분리하고 싶지 않아

나는이 게시물 How to center a checkbox in a table cell?을 보았지만 나를 위해 작동하지 않습니다.

+0

원하십니까? http://jsfiddle.net/gSaPb/ 또는 어떻게 하시겠습니까? – KarSho

답변

0

<select> 요소에 style="vertical-align:top"을 추가하십시오.

+0

거의 작동합니다. 여기에서보십시오 http://jsfiddle.net/dsea/QCr3a/4/. 나는 1st가 제 2의 것처럼 정렬 될 수 있는지 궁금하다? 덕분에 – dsea

+0

나는 ''이 아니라고 덧붙였다. –

+0

네, 저도 그렇습니다. (그리고 오해에 대해 매우 유감스럽게 생각합니다) – dsea

관련 문제