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

checkbox label with "for" attribute alignment issue #13075

Closed
andraskende opened this issue Mar 15, 2014 · 3 comments
Closed

checkbox label with "for" attribute alignment issue #13075

andraskende opened this issue Mar 15, 2014 · 3 comments
Labels

Comments

@andraskende
Copy link

Just noticed my checkboxes with labels using 'for' attributes are aligned incorrectly since these commit: #13003

this is the html what I use for checkboxes :

<div class="input checkbox">
    <input type="checkbox" name="active"  value="1" id="UsrActive" />
    <label for="UsrActive">Active</label>
</div>

for now just reverted back the changes on my custom.css :

.checkbox {
    padding-left: 20px;
}
.radio label,
.checkbox label {
    display: inline;
    padding-left: 0px;
}

Is there any way to support the label with "for" attribute ?
or a checkbox wrapped inside label is a more correct way and supported now ?

Thank you,
Andras

@cvrebert cvrebert added the css label Mar 15, 2014
@mdo
Copy link
Member

mdo commented Mar 15, 2014

Wrap your inputs in the label. You can still use the for attribute, but yeah, the markup requires this.

@mdo mdo closed this as completed Mar 15, 2014
@HybridSolutions
Copy link

Those who use asp.net will have checkboxes outside label controls. Bootstrap should support both methods.

@cvrebert
Copy link
Collaborator

cvrebert commented Oct 6, 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