espresso_coffee
espresso_coffee

Reputation: 6110

Arrange two checkboxes in same table cell vertically

I'm wondering if possible to arrange two checkbox input fields vertically in same td cell? Below is example, there both of input fields are next to each other.

<table>
  <tr>
      <td>
           <input type="number" />
           <input type="checkbox" name="ck1" id="ck1">A
           <input type="checkbox" name="ck2" id="ck2">B
      </td>
  </tr>
</table>

Upvotes: 2

Views: 493

Answers (1)

Koby Douek
Koby Douek

Reputation: 16675

How about using a simple <br> with using text-align:right on the <td>?

<table>
  <tr>
    <td style='text-align:right'>
      <input type="number">
      <input type="checkbox" name="ck1" id="ck1">A<br>
      <input type="checkbox" name="ck2" id="ck2">B
    </td>
  </tr>
</table>

Upvotes: 3

Related Questions