Search code examples
htmlcsscheckboxbootstrap-4baseline

Can I adjust the vertical position of checkboxes in HTML text?


I'm creating a website with Bootstrap 4, and at least in Chrome on Windows 10, the checkboxes are shown a bit too high in a line:

enter image description here

These are <input type="checkbox"> elements enclosed in <label>s.

I would like to move the checkbox itself down by 3px or so. Is this possible with CSS?


Solution

  • Try using vertical-align: middle;

    input[type="checkbox"] {
    vertical-align: middle;
    }
    <div class="test">
        text <input type="checkbox" name="">
    </div>