question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mismatched height of input-group append/prepend elements in horizontal forms

See original GitHub issue

Hello!

There seems to be a problem with input-groups in horizontal forms. Namely, If the form-group gets bigger (due to the label being long for example) the append/prepend elements follow the form-group size, while the input itself stays the same. This results in the append/prepend elements not matching their input size.

Reduced Test case: https://jsbin.com/pidudozuku/edit?html,output Suggested Fix: The simplest solution to me seems to be:

 .input-group {
   height: $input-height;
}

Here’s the above in jsbin (with input-height hardcoded): https://jsbin.com/moqojozega/edit?html,output

Also adding either input-group-sm/input-group-lg prevents the problem for happening, but of course it changes the size of the input so it’s not an ideal solution.

Operating System: Ubuntu 16.04 Tested On: Firefox, Opera, Chromium (latest versions)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
florianlacreusecommented, Oct 24, 2018

Is it right to have col-sm-9 and input-group at the same level, side by side in the same class attribut?

See horizonral form doc: div blocks wrapping input, checkbox, etc. have only one css class, .col*.

Reduced test case fixed: https://jsbin.com/vuletujofo/1/edit?html,output

1reaction
MartijnCuppenscommented, Jan 5, 2019

Nope, the solution you provided is the way this should be fixed, thanks for the effort you put into this @florianlacreuse!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap 4.0 input-group-append and prepend show wrong ...
I think your problem is that the width of the elements inside the columns don't fit on they, so they break on multiples...
Read more >
Forms - Bootstrap
Examples and usage guidelines for form control styles, layout options, and custom components for creating a wide variety of forms.
Read more >
Bootstrap Input Sizing - W3Schools
The following examples shows input elements with different heights: ... You can quickly size labels and form controls within a Horizontal form by...
Read more >
Input - Lightning Design System
It is used for small, non-editable form fields that sit next to inputs and allows the size and height to align. It is...
Read more >
Bootstrap Form Input - Easy HTML5 Video
Always remember, given that Bootstrap utilizes the HTML5 doctype, all inputs need to possess a type attribute. Form regulations. <form> <div class="form-group"> ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found