Checkbox layout in CSS

I'm trying to use checkboxes in a form layout using css. Does anyone have the css code and html for a css layout using checkboxes. My checkboxes are not lining up with the labels, and when I click on the labels it does not check the checkbox... even if I wrap the input tag with lable tag etc.
LVL 1
jasch2244Asked:
Who is Participating?
 
Tony van SchaikConnect With a Mentor Front-end Web developerCommented:
If you want to align the labeltext vertical use style="vertical-align:middle;width:32;height:32;"
More info here:
http://stackoverflow.com/questions/306252/how-to-align-checkboxes-and-their-labels-consistently-cross-browsers
http://www.xinotes.org/notes/topic/437/
 
 
0
 
thehagmanCommented:
Clicking on a label does not toggle the check box - that is by design: Clicking the label shall only *focus* an input element.
0
 
jasch2244Author Commented:
It appears that if you use a for in the lable tag or wrap the input tag with the lable tags that infact you can select / toggle the check box
0
 
jasch2244Author Commented:
vertical-align on the input / checkbox seemed to fix the problem.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.