How to spread 3 checkboxes evenly across form
# July 14, 2013 at 7:19 am
I’m having some difficulty creating a 3-column checkbox questionnaire thing at the top of my contact form. I’ve wrapped each label/checkbox with a div and tried to use floats to space them evenly across the form but the text keeps dropping down to the next line. [Here’s a link to the problem](http://cdpn.io/vsLng “codepen”). Any help people? Also, not quite sure how to fix the vertical alignment of the left-aligned text with the white input space. Love your thoughts!
Thanks in advance.
B# July 14, 2013 at 10:26 am
@Paulie_D No, I mean’t I had a solution. I tested your solution and it doesn’t seem to work ? (including the input width)
For my solution, I used `inline-block` instead of floats. Instead of sifting through the code I just put in the necessary resets of rules.# July 14, 2013 at 6:48 pm
Thanks for your posts. I also thought to use inline-block but then the alignment goes awry. What I want is for the three checkboxes to be spread _evenly_ across the page. So that the first checkbox (and label) are left aligned, the second is dead center and the third is hard right. Visually that seems to be the best layout. If I float three divs with text I can get them to look exactly right, but when I wrap the label/checkbox combo the two don’t fit on the same line.. Any more suggestions? what am I doing wrong?# July 15, 2013 at 6:54 am
Slighty better. http://codepen.io/Paulie-D/pen/axhsm
The top one uses inline-block but requires a change in the source order for checkbox-3
The bottom one is in the correct source order but the floats mean that some tweaks would have to be made in the positioning.
You must be logged in to reply to this topic.