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

Inline checkboxes with blank space overlap in Chrome #1969

Closed
jaimeirurzun opened this issue Feb 14, 2012 · 4 comments
Closed

Inline checkboxes with blank space overlap in Chrome #1969

jaimeirurzun opened this issue Feb 14, 2012 · 4 comments
Labels
Milestone

Comments

@jaimeirurzun
Copy link

See example 2:

Alt Text

The first two forms have the same markup, with the only difference of the space in the label "Check 2":

<form class='form-inline'>
    <input type='text'/>
    <label for='check1' class='checkbox inline'>
      <input type='checkbox' id='check1' name='check1'/>
      Check1
    </label>
    <label for='check2' class='checkbox inline'>
      <input type='checkbox' id='check2' name='check2'/>
      Check 2
    </label>
    <button type='submit' class='btn'>Button</button>
</form>

The third form is an equivalent version with no bootstrap styles applied (only display: inline-block;), to ensure it's not Chrome itself causing this. This happens in latest Chrome (17.0.963.46), but renders correctly in latest Firefox (10.0).

mdo added a commit that referenced this issue Feb 21, 2012
@mdo
Copy link
Member

mdo commented Feb 21, 2012

Finally tracked this down—was a result of the float, negative margin, and padding coming together on the checkbox. All resolved in 2.0.2-wip.

@mdo mdo closed this as completed Feb 21, 2012
@jaimeirurzun
Copy link
Author

The same still happens if you want checkboxes to display inline inside a form-horizontal form:

<form class='form-horizontal'>
    <input type='text'/>
    <label for='check1' class='checkbox inline'>
      <input type='checkbox' id='check1' name='check1'/>
      Check1
    </label>
    <label for='check2' class='checkbox inline'>
      <input type='checkbox' id='check2' name='check2'/>
      Check2
    </label>
    <button type='submit' class='btn'>Button</button>
    <label for='check3' class='checkbox inline'>
      <input type='checkbox' id='check3' name='check2'/>
      Check 3
    </label>
    <button type='submit' class='btn'>Button</button>
</form>

Alt Text

Unless you consider this is a hacky use of form-horizontal.

@cvrebert
Copy link
Collaborator

cvrebert commented Mar 6, 2014

Reopening for further investigation per #12943 (comment)

@cvrebert cvrebert reopened this Mar 6, 2014
@mdo
Copy link
Member

mdo commented Mar 7, 2014

I don't think this is an issue anymore—I couldn't trigger it in Chrome.

@mdo mdo closed this as completed Mar 7, 2014
stempler pushed a commit to stempler/bootstrap that referenced this issue Apr 11, 2014
stempler pushed a commit to stempler/bootstrap that referenced this issue Apr 11, 2014
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
cvrebert added a commit that referenced this issue Dec 22, 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

3 participants