Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Taryn Trueblood
21,798 PointsLabels and input controls
I am trying to create an form and I was wondering with input controls like radio's and checkboxes, is it okay to put checkbox or radio buttons inside of the label? I am trying to line up my checkboxes and radio buttons above each other with the corresponding labels next to them. if that is not the correct way, how do I do that?
2 Answers
Joseph Dunleavy
4,491 Points<input type="radio"> <label>radio</label><br>
<input type="checkbox"> <label>name</label>
Alexander Nortung
6,930 PointsHello, a good way to create labels and radio buttons so they will be alligned is just to make the radio button forst and then the label http://w.trhou.se/dera1x4w89 you can take a look at this code and see if that works for you, else let me know what you think
Aurelian Spodarec
10,801 PointsWaht about display block? and then a trick for the input or the button