Solved

Checkbox layout in CSS

Posted on 2009-05-07
4
465 Views
Last Modified: 2012-05-06
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.
0
Comment
Question by:jasch2244
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
Tony van Schaik earned 500 total points
ID: 24328921
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
 
LVL 20

Expert Comment

by:thehagman
ID: 24329077
Clicking on a label does not toggle the check box - that is by design: Clicking the label shall only *focus* an input element.
0
 
LVL 1

Author Comment

by:jasch2244
ID: 24329119
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
 
LVL 1

Author Closing Comment

by:jasch2244
ID: 31579146
vertical-align on the input / checkbox seemed to fix the problem.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now