[Ruby] ruby on rails, formatting check_box

shane becker veganstraightedge at gmail.com
Wed Aug 1 21:46:28 PDT 2007


> Usually, it's best to wrap your input with the label, so:
> <label for='content_segment_needs_review'>
>   <input id='content_segment_needs_review' name='content_segment 
> [needs_review]' type='checkbox' value='1' />
>   Needs review
> </label>

i don't think that's the way it goes. i'm pretty sure it goes like this:
<label for="your_face">Label</label>
<input id="your_face" name='your_mother[your_face]' value='1' />

http://www.w3schools.com/tags/tag_label.asp


> To get line breaks to handle the way you want you, might try using  
> some CSS,
> specifically: label{ white-space: nowrap }. Might work. Haven't  
> tried it.

white-space is a goofy attribute. i would give these two a try.
{ display: inline }
{ display: block }


good luck.
-shaners





-----------
join the resistance. fall in love.
http://theresistancearmy.com




More information about the Ruby mailing list