bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

css bug on homepage

Open burningTyger opened this issue 14 years ago • 13 comments

as seen on http://twitter.github.com/bootstrap/base-css.html

burningTyger avatar Mar 12 '12 21:03 burningTyger

Any more information you might add. Don't think I have seen this issue in any browser.

sushaantu avatar Mar 12 '12 22:03 sushaantu

I'm on current Chrome, Lion.

burningTyger avatar Mar 12 '12 22:03 burningTyger

confirmed on firefox 11 and 13a1 and 12a2.

Merg1255 avatar Mar 12 '12 23:03 Merg1255

I'm on Lion 10.7.3 and Chrome 17.0.963.79 and I'm NOT seeing this bug.

EDIT: After a browser refresh, I'm seeing the bug as well.

JMayfield avatar Mar 12 '12 23:03 JMayfield

Have you all RELOADED your browser to see 2.0.2?

burningTyger avatar Mar 12 '12 23:03 burningTyger

Oh, burningTyger's correct. I'm seeing the bug, post reload.

JMayfield avatar Mar 12 '12 23:03 JMayfield

seems to only affect <i> icon prepended forms.

burningTyger avatar Mar 12 '12 23:03 burningTyger

I got the same Problem :) No matter if it's a icon. When i write it in the same line, there's no gap between prepend-input and input, but the prepend-input is still lower. I am not able to solve it :|

<div class="row">
<div class="span4">
<form accept-charset="utf-8">
<div class="input-prepend">
<span class="add-on"><i class="icon-envelope"></i></span><input type="text" class="input-large">
</div>
<div class="input-prepend">
<span class="add-on">P</span><input type="password" class="input-large"/>
</div>
<a href="#" class="btn btn-primary btn-large">
<i class="icon-home icon-white"></i> Login</a>
</form>
</div>
</div>

jubi4dition avatar Mar 13 '12 00:03 jubi4dition

Appears to be caused by margin-bottom: 9px on the adjacent input. Removing margin or setting vertical-align: top on the .add-on class resolves it.*

*ish

Edit: Ah, the form is missing one of the form clases that sets the margin-bottom to 0 on input elements.

Edit #2: @jubi4dition: I'm seeing the same thing, that the whitespace is causing the horizontal gap.

robflaherty avatar Mar 13 '12 00:03 robflaherty

Adding display: inline-block here introduced the whitespace problem. https://github.com/twitter/bootstrap/commit/91eef351e40c7833041e68fdddba8c2b43ebc702#diff-4

Is it expected that everyone knows inline-block elements respect whitespace? If so the fix is a simple docs edit. Just read the heads-up in the changelog about .add-on elements. Submitted pull request.

robflaherty avatar Mar 13 '12 02:03 robflaherty

I don't really understand, when i use form-inline, then input-prepend and input fit together, but there's no vertical gap between the two input fields.

jubi4dition avatar Mar 13 '12 11:03 jubi4dition

Regarding the vertical spacing problem, adding form-inline was a hack for the documentation. Prepended and appended inputs should be fixed to work in vertical forms. Looks like it can be achieved in a few ways:

  1. Set .add-on to vertical-align: top
  2. Set bottom margin to 0 on vertical form inputs

Seems like both might be problematic...

robflaherty avatar Mar 13 '12 12:03 robflaherty

Resolved in 2.0.3-wip by removing the margin on inputs in the prepend/append components. Thanks!

mdo avatar Mar 23 '12 00:03 mdo