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

Alignment of input value and .form-control-static for several columns in a row #13872

Closed
prbaron opened this issue Jun 19, 2014 · 8 comments
Closed
Labels
Milestone

Comments

@prbaron
Copy link

prbaron commented Jun 19, 2014

Hello,

I created a two columns forms, the first column has an input and the second, a static field. As you can see on the screenshot below, the two values are not aligned.

alignement error

But when I set this, it is ok.

.form-control-static {
    padding-top : 7px
}

alignement fixed

However, the padding can be strange when no input on the same line. So should we solve this ?

Best regards

@cvrebert cvrebert changed the title Alignement of input value and .form-contrl-static for several columns in a row Alignement of input value and .form-control-static for several columns in a row Jun 19, 2014
@cvrebert cvrebert changed the title Alignement of input value and .form-control-static for several columns in a row Alignment of input value and .form-control-static for several columns in a row Jun 19, 2014
@cvrebert
Copy link
Collaborator

Duplicate of #12801 perhaps? Please re-test using the latest CSS in the master branch.

@cvrebert cvrebert added the css label Jun 19, 2014
@cvrebert
Copy link
Collaborator

Hmm, yeah, .form-control-static only helps with form-horizontal.

@cvrebert cvrebert added this to the v3.2.1 milestone Jun 19, 2014
@mdo mdo mentioned this issue Jun 20, 2014
@mdo
Copy link
Member

mdo commented Jun 20, 2014

Fix applied and demo-ed in http://jsbin.com/xuxaq/1.

@mdo mdo modified the milestones: v3.2.1, v3.2.0 Jun 20, 2014
@twbs-lmvtfy
Copy link

Hi @mdo!

You appear to have posted a live example (http://jsbin.com/xuxaq/1), which is always a good first step.
However, according to the HTML5 validator, your example has some validation errors, which might be causing your issue:

  • line 6225, column 46: Bad value `for attribute` for `on HTML element` label: An ID must not be the empty string.
  • line 6231, column 46: Bad value `for attribute` for `on HTML element` label: An ID must not be the empty string.
  • line 6225, column 46: The for attribute of the label element must refer to a form control.
  • line 6231, column 46: The for attribute of the label element must refer to a form control.

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!

(Please note that this is a fully automated comment.)

@mdo mdo closed this as completed in 1e53dcd Jun 20, 2014
@prbaron
Copy link
Author

prbaron commented Jun 20, 2014

I checked your file and it works great. However, shouldn't we add some classes for form-control-static?

for exemple : .form-control-static-lg, .form-control-static-sm, ... to get the right padding-top value ?

@cvrebert cvrebert reopened this Jun 20, 2014
@mdo
Copy link
Member

mdo commented Jun 20, 2014

Attaching .input-lg and .input-sm to these controls will do what you need. Pushing the tweaks for that now.

@mdo
Copy link
Member

mdo commented Jun 20, 2014

Oh, and see it in action at http://jsbin.com/xuxaq/2.

@mdo mdo closed this as completed in e98fc37 Jun 20, 2014
@prbaron
Copy link
Author

prbaron commented Jun 20, 2014

Thank you ! I wanted to propose it, but I wasn't sure about the responsibility of these classes concerning the .form-control-static.

stempler pushed a commit to stempler/bootstrap that referenced this issue Nov 4, 2014
stempler pushed a commit to stempler/bootstrap that referenced this issue Nov 4, 2014
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