Bootstrap 3 border radius missing in input-group - css

Using Bootstrap 3.4 why the input-group missing all border radius ?
<form action="{{ route('dashboard.users.index') }}" method="get">
<div class="input-group">
<input type="text" name="search" class="form-control">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">
<i class="fa fa-search"></i>
</button>
</span>
</div>
</form>
inspect element:
.input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child>.btn, .input-group-btn:first-child>.btn-group>.btn, .input-group-btn:first-child>.dropdown-toggle, .input-group-btn:last-child>.btn-group:not(:last-child)>.btn, .input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
Should I fix it with my own css?

It looks like it is by design. See an image (I used your markup, just added inner text into <i class="fa fa-search"></i>):
You have two inputs in a row. Outside corners have border-radius but inner corners don't have. And it looks pretty good. If you need to override that behavior you need to create you own css that will override default styles.

I'm using bootstrap rtl and i put it accidentally before the original bootstrap.min.css .. when the order changed .. the problem fixed .. thank you for helping

Related

Angular : add a fixed search barch to a mat-select dropdown

I'm using a mat-select widget (of Angular-Material) in my app
I'm implementing a search bar at the top of the select drowpdown to filter options:
<mat-select placeholder="Selectionner la boutique"
id="libelleShop">
<div id="custom-search-input" class="m-1 navbar-fixed-top">
<input #shopKeyword matInput placeholder="Search" class="search-input" (keyup)="filterShopsByLibelle(shopKeyword.value)">
<span class="input-group-btn">
<button class="btn btn-danger" type="button">
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
</div>
<mat-option *ngFor="let shop of bad3ShopsListSortedByName"
[value]="shop.edoId">
{{shop.storeName}}
</mat-option>
</mat-select>
My purpose is how to keep the search Bard div (#custom-search-input) fixed on the top.
I've tried position: fixed but it seems to not work
Suggestions ??
Solution 1
<mat-select-search [formControl]="formControlName"></mat-select-search>
Add this tag inside mat-select and follow the steps in app.component.ts of StackBlitz
Solution 2
You can use Autocomplete of Angular material
https://material.angular.io/components/autocomplete/overview
Make the css(custom-search-input) value as
.custom-search-input
{
position:sticky;
top:0;
z-index:1;
}
This solution worked for me

UIB Datepicker Button Height

I am using uib-datepicker with following html:
<div id="date-group" class="form-group">
<div class="input-group">
<input id="dateInput" type="text" class="form-control" uib-datepicker-popup="{{format}}" is-open="popup1.opened" datepicker-options="dateOptions" ng-required="true" close-text="Close" alt-input-formats="altInputFormats" ng-model="searchForm.date"/>
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="open1()">
<i class="glyphicon glyphicon-calendar"></i>
</button>
</span>
</div>
</div>
And It looks like this. I am using bootstrap 3.3.6. Any suggestions?
You need to modify the CSS on the button .btn-default attribute. Add some padding to the button and change the vertical-align or margin. Change the positioning nonetheless.
I tried to add padding and adjust the margin of the button and the vertical-align, but the default Bootstrap styling overrides what I tried, I can't get too deep into coding right now.
Here's a nice little tutorial on styling Bootstrap buttons or use the Bootstrap documentation to change the class of the button you're using.
Or take a look at the Angular directive for Bootstrap, the Datepicker Popup. I think that is your best bet.

bootstrap css textbox and button positioning

Code contains text box and button
HTML:
<div id="input-collection" class="input-group input-group-lg">
<span class="input-group-addon">
<i class="glyphicon glyphicon-link"></i>
</span>
<input id= "url-input-box" type="url" class="form-control" name = "url" placeholder="http://www.example.com">
<span class="input-group-btn">
<button id="submit-url-btn" class="btn btn-success" type="button">Go</button>
</span>
</div>
which shows button and texbox like:
I changed margin-top and margin-left in all above class but no change.
Where I need to make change here?
Use Firebug (or chrome developer tools - Ctrl+Shift+J)
Look at the margin-bottom settings of: submit-url-btn (the tag)
against the margin-bottom of the url-input-box (span)
It seems that the button has a high value on margin-bottom. set both to 0 and see how they are positioned.

Incorrect glyphicon sizes in form / .input-group / .input-group-addon inputs in bootstrap 3

I am trying to add glyphicons to form input boxes using bootstrap 3.
However, the glyphicons are displayed larger than the input textbox, as can be seen here:
The documentation says Use .input-group with an .input-group-addon to prepend or append elements to a .form-control.
As far as I can tell, I'm doing just this, but I clearly have something wrong, and can't figure out what it is.
Markup and fiddle below:
<div class="jumbotron">
<h4>Glyphicons, why you no look nice?</h4>
<form name="form">
<div class="input-group">
<span class="input-group-addon glyphicon glyphicon-envelope"></span>
<input type="email"
class="form-control"
placeholder="Email"
name="email"/>
</div>
<div class="input-group">
<span class="input-group-addon glyphicon glyphicon-lock"></span>
<input type="password"
class="form-control"
placeholder="Password"
name="password"/>
</div>
</form>
</div>
Working example on jsfiddle
It's because the font-size is being inherited from the 'jumbotron' (21px).
You'll need to explicitly set the font-size on the form or its items.
Also, once you use the glyphicon class, you'll get the top: 1px so you'll need to set that to 0 for the addon to line up with the input.
Here's my updated fiddle.

Select "arrow" hidden in bootstrap 3 input group in IE9

I have the following html styled by bootstrap 3 that defines a group of inputs:
<div class="input-group">
<select class="form-control" >Some options here</select>
<a class="btn btn-default input-group-addon disabled" title="Legg til" disabled="" href="#" ><i class="glyphicon glyphicon-plus-sign"></i></a>
</div>
This gives the following result in most browsers (including IE10):
However in IE9, the "arrow" for the dropdown is missing:
Anyone know a fix for this in IE9?
I found the issue here. It seems that the arrow button is simply hidden below the button with the plus icon. So the select box is the entire width, and the other buttons end up overlying it.
So the fix was to add float:left to the select box, and voila!
You should use .input-group-btn to avoid this issue :
<div class="container">
<form role="form">
<div class="form-group">
<div class="input-group">
<select class="form-control">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<span class="input-group-btn">
<a class="btn btn-default" href="#"><i class="glyphicon glyphicon-plus-sign"></i></a>
</span>
</div>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
You just need to remove padding on the select tag. You'll first need conditional classes for IE9.
<!--[if IE 9 ]><html class="ie9"><![endif]-->
Then just simply remove the padding on the select tags.
.ie9{
select.form-control{
padding: 0 !important;
}
}

Resources