Search code examples
htmlcssjspstylesheet

How do I align button in a table according to the previous button


How do I shift a button to align with the button on the right as follows:

enter image description here

The html as follows:

<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>


Solution

  • <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>