Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap 3 multi input-group-addon style behavior

I am using bootstrap3 and I would like to use multiple inputs-group-addon together. If I try to do so, unfortunately I get in some elements a 2px border instead of 1px. enter image description here

Bootply

What kind of CSS style I could use to solve my problem? Thanks

like image 401
Gus Avatar asked Apr 07 '26 21:04

Gus


2 Answers

This is a common known problem in bootstrap, you can overcome this problem by overriding '.inputs-group-addon' class.

bootply

Example

.input-group-addon:first-child + .input-group-addon:last-child {
    border-left: 1px solid #ccc;
}

.input-group-addon:not(:first-child):not(:last-child) + .input-group-addon:not(:first-child):not(:last-child) {
    border-left: 0;
}

.form-control + .input-group-addon:not(:first-child):not(:last-child) {
    border-left: 0;
}

.input-group-addon:not(:first-child):not(:last-child) + .form-control {
    border-left: 0;
}

Also there is an issue in bootstrap.

like image 193
Malindu Avatar answered Apr 12 '26 18:04

Malindu


Add following CSS:

.input-group-addon{
     border-left: 0;
}

This will work. See this.

like image 42
Rahul Singh Avatar answered Apr 12 '26 18:04

Rahul Singh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!