3

Possible Duplicate:
How to align checkboxes and their labels consistently cross-browsers

I have this code:

<div id="form-footer">
    <ul>
       <li>
           <label for="test">Label text</label> 
           <input type="checkbox" name="" value="" id="test" />
       </li>
    </ul>
</div>

How can I align the label and the checkbox? At the moment I see the checkbox align on top with respect to the label, I would like to see it in the middle.

Community
  • 1
  • 1
Dail
  • 4,622
  • 16
  • 74
  • 109

2 Answers2

0

if everything is one-line you could use the line-height property:

#form-footer li { height: 30px; line-height: 30px; /** same as height */ }
Curtis
  • 101,612
  • 66
  • 270
  • 352
giorgio
  • 10,111
  • 2
  • 28
  • 41
-2
​input[type=checkbox] { vertical-align: middle; }​

Or any of the vertical-align properties

F.P
  • 17,421
  • 34
  • 123
  • 189