简体   繁体   中英

How do I align label for checkbox in formtastic for rails 3?

I am using the following for a check-box on a form:

= f.input :post_linkedin, :label => "Post to my LinkedIn Network", 
  :hint => "Sharing your expertise on LinkedIn helps you gain credibility, visibility and potential opportunities"

However, the rest of the form has labels aligned to the left of the fields. This puts the checkbox immediately to the right? Is that right?

The "hint" ends up being on the same line rather than as a separate line.

How can I make it appear on a separate line (without getting into css, wanted to see if formtastic could take care of it). But if I do, what would it be?

There's nothing you can do in Ruby, or with Formtstic - you're going to have to control it using CSS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM