2016-12-14 4 views
1

前のボタンに応じて、テーブルのボタンを揃えるん:どのように私は次のように私は右のボタンを整列するボタンをシフトするにはどうすればよい

enter image description here

HTMLを次のように

<table> 
 
    <tr> 
 
    <td> 
 
     <h4> Search: </h4> 
 
    </td> 
 
    <td> 
 
     <input type="text" /> 
 
    </td> 
 
    <td> 
 
     <button type="submit" name="abc" form="submitForm" value="Button">Button</button> 
 
    </td> 
 
    </tr> 
 
    <tr> 
 
    <td class="customView"> 
 
     <button type="submit" name="def" form="submitForm" value="Button">Button</button> 
 
    </td> 
 
    </tr> 
 
</table>

答えて

1
<table> 
    <tr> 
    <td> 
     <h4> Search: </h4> 
    </td> 
    <td> 
     <input type="text" /> 
    </td> 
    <td> 
     <button type="submit" name="abc" form="submitForm" value="Button">Button</button> 
    </td> 
    </tr> 
    <tr> 
    <td colspan="2"></td> 
    <td class="customView"> 
     <button type="submit" name="def" form="submitForm" value="Button">Button</button> 
    </td> 
    </tr> 
</table> 
+0

このコードを確認してくださいhttps://jsfiddle.net/vh4y426f/3/ –

0

マッチ第一と第二行目のtd秒数 - dd 2 empty tdを2番目の行に入力します。

はデモは、以下を参照してください:

<table> 
 
    <tr> 
 
    <td> 
 
     <h4> Search: </h4> 
 
    </td> 
 
    <td> 
 
     <input type="text" /> 
 
    </td> 
 
    <td> 
 
     <button type="submit" name="abc" form="submitForm" value="Button">Button</button> 
 
    </td> 
 
    </tr> 
 
    <tr> 
 
    <td></td> 
 
    <td></td> 
 
    <td class="customView"> 
 
     <button type="submit" name="def" form="submitForm" value="Button">Button</button> 
 
    </td> 
 
    </tr> 
 
</table>

+0

私は、おかげでこれについて自分の考えをお聞かせ@isme! – kukkuz

1

があなたの<td>タグそれの作業罰金にcolspan="3"align="right"を追加し、私は以下のスニペットを追加しています。

<table> 
 
      <tr> 
 
      <td><h4> Search: </h4></td> 
 
      <td><input type="text"/> </td> 
 
      <td><button type="submit" name="abc" form="submitForm" value="Button">Button</button></td> 
 
      </tr> 
 
      <tr > 
 
      <td class="customView" colspan="3" align="right"><button type="submit" name="def" form="submitForm" value="Button">Button</button></td> 
 
      </tr> 
 
    </table>

関連する問題