I am using this plugin in my project, and trying to remove the blue border on focuse on the select. I have tried by setting the outline to none, like this:
*:focus {
outline: 0!important;
}
I have also tried with outline:none
, but it is not working, how can I remove the outline from it?
I am using the same html as suggested in the plugin docs:
<select name="position" value="{{ $player->position or old('position') }}" class="selectpicker show-menu-arrow form-control" multiple data-max-options="3" data-icon-base="ion" data-tick-icon="ion-checkmark-round" title="Choose positions (max 3)" required>
@foreach($positions as $key => $value)
<option data-subtext="{{ $key }}">{{ $value }}</option>
@endforeach
</select>
If you're using Bootstrap 4, add box-shadow: none (and don't forgot the prefix -webkit-box-shadow: none ) to this answer. Also note that Bootstrap 4 already has . btn:focus { outline: none } in its btn classes.
To remove focus around the button outline:none property is used. Outline property: Outline is an element property which draws a line around element but outside the border. It does not take space from the width of an element like border.
Using the CSS rule :focus { outline: none; } to remove an outline on an object causes the link or control to be focusable, but removes any visible indication of focus for keyboard users. Methods to remove it such as onfocus="blur()" result in keyboard users being unable to interact with the link or control.
How to change this issue with the help of CSS or Bootstrap? The solution is adding “outline: none;” to the selector.
I fixed it with this:
.bootstrap-select .btn:focus {
outline: none !important;
}
and you should add it at the end of your css code after the bootstrap-select.css
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With