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,058
  • 14
  • 68
  • 100

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 */ }
Curt
  • 94,964
  • 60
  • 257
  • 340
giorgio
  • 9,517
  • 2
  • 25
  • 40
-2
​input[type=checkbox] { vertical-align: middle; }​

Or any of the vertical-align properties

F.P
  • 15,760
  • 32
  • 114
  • 184