Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TWBS3 Horizontal Form: .help-block wraps unnecessarily under a short field #9694

Closed
jtickle opened this issue Aug 16, 2013 · 8 comments
Closed
Labels

Comments

@jtickle
Copy link
Contributor

jtickle commented Aug 16, 2013

I love the form-horizontal style and how the .help-block text looks below the form element. However, if you want the element to be short (like "state" or "province" on an address form), since both the element and the help-block are crammed inside a tiny "column", the help block gets wrapped instead of expanding to fill.

edit AGAIN: http://jsfiddle.net/GDMGg/

I'm not sure right off how to fix this, but I think the "width specification" should be available on the div containing the elements OR on the element itself.

@cvrebert
Copy link
Collaborator

You're missing div.panel-body in your markup.

@jtickle
Copy link
Contributor Author

jtickle commented Aug 16, 2013

Sorry about that, I linked to the wrong Fiddle; the correct link is now in the description.

@jtickle
Copy link
Contributor Author

jtickle commented Aug 16, 2013

And I had to fix the link again. Sorry, my jsFiddle-foo is weak today.

@cvrebert
Copy link
Collaborator

Just need to apply some grid-fu: http://jsfiddle.net/GDMGg/6/

@mdo
Copy link
Member

mdo commented Aug 16, 2013

By name, the help block is a block level element—it'll always wrap. You'll need to customize it or utilize the grid columns to lay things out.

@mdo mdo closed this as completed Aug 16, 2013
@jtickle
Copy link
Contributor Author

jtickle commented Aug 16, 2013

Still getting used to this new grid. Thanks guys!

@ajfranzoia
Copy link

The only drawback to the grid workaround is that, when being nested in another row, the width based on % gets modified, see http://jsfiddle.net/GDMGg/22/. Any possible way to circumvent this?

@ajfranzoia
Copy link

Nvm, just wrap the col-* input container inside a row and another col-*-12 to have a more fine-grained control over their width, and do the same with help-blocks or errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants