Remove Bootstrap-Table's box-shadow on the search bar's delete button

Is there a way to eliminate the box-shadow from the search box upon clicking on it?

I am familiar with removing box-shadows from classes in CSS, but I am unsure of how to remove the box-shadow from a specific property like "data-search" within the tag.

Answer №1

When using the data-search option to create an input field, it will have two classes: form-control (which inherits Bootstrap styling including box-shadow for focused input) and search-input, a class unique to bootstrap-table that can override the default behavior.

Make sure no other element on your page has the same class if you don't want to unintentionally override their styles.

To customize the input field, you can use the following CSS code. While there might be a way to do it with SASS, I find CSS the simplest and most clear method for this example.

.search-input:focus {
  box-shadow: none;
  border: 1px solid #ced4da;
}

The style defined by .search-input:focus will only take effect when the input is focused.

box-shadow: none; removes the box shadow effect.

If you want the input field to maintain a consistent look regardless of focus, you can use border: 1px solid #ced4da; to mimic its unfocused appearance.

For a live demonstration of this, you can visit the Bootstrap-table online editor.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How can I show only the final four digits of an input field using Angular Material and AngularJS?

As a newcomer to Angular Material and Angular JS, I am striving to create an md-input field that displays only the last 4 digits in a masked format, such as "********1234". While my experience is currently limited to using md-input password fields where ...

Solving alignment issues by utilizing a clever negative margin-left technique for compact windows

I've managed to center-align a div using the following method: <div id="container" style="position:absolute; top:0px; left:50%; margin-left:-500px; width:1000px;"></div> After referring to this solution Trying to center div horizontally ...

Could there be a coding issue stopping <div class="rating"> from aligning more centrally along the horizontal axis on the screen?

Just wondering, could there be something in my code that's preventing <div class="rating"> from moving closer to the center? And is there a way to make it move closer horizontally? (On a side note, CSS layout and positioning still puzz ...

Alpha Screen and Shading Filter

Having trouble with CSS filters in IE8. I have a div with a gradient background that needs to have opacity set to 0, and when hovered over, the opacity should change to 1. Here's my code: #myDiv { filter: alpha(opacity=0); opacity: 0; background:rgba ...

Ways to modify the color variable in Bootstrap

I've been attempting to modify the primary/secondary, etc. colors in my project, but so far I haven't had any luck. Here is the code I've been working with: https://github.com/AndreSantosRaposo/UniShare/tree/main/front-end/src You can find ...

What CSS attribute determines the distinction in visual presentation between two elements that share the same CSS configurations?

In the HTML code below, there is a button and a div with the same class and content: <div class="root"><!-- --><button class="outer"><div class="middle"><div class="inner">label</div></div></button><!-- - ...

How to vertically center align h1 using Bootstrap

<body> <nav class="navbar navbar-expand-md bg-dark navbar-dark py-3"> <div class="container"> <div class="navbar-brand mx-auto"><h2 style="color: white;">Name< ...

Is there a way to ensure that the vertical scrollbar remains visible within the viewport even when the horizontal content is overflowing?

On my webpage, I have multiple lists with separate headers at the top. The number of lists is dynamic and can overflow horizontally. When scrolling horizontally (X-scrolling), the entire page moves. However, when scrolling vertically within the lists, I wa ...

What is the solution for the error "At-rule or selector required" ?

Can someone help me with my CSS code issues? I'm having trouble on the first and last lines. Total newbie here :) Error Messages: at-rule or selector expected (ln 1, Col 1) at-rule or selector expected (ln 51, Col 1) &bso ...

Achieve full height for div without causing it to expand (utilize scrollbar for overflow)

I am looking to achieve a specific layout for my webpage, as shown in the image below: The layout depicted in the image above is created using the following HTML and bootstrap classes: <div className="ContentWrapper d-flex mh-100 flex-row h-10 ...

Incorporate a section of text to flow around a floated image within a paragraph

https://i.sstatic.net/s5aFq.png How can I achieve the text wrapping above an image similar to the layout in the sunflower picture? I have tried using relative positioning and adjusting the top property, but it doesn't allow the text to wrap around th ...

Sticky positioning for dropdown menu in table column body

Greetings, I need some assistance with a formatting issue. My goal is to make the first and second columns of my table sticky by applying a "sticky" position to them. However, one of the columns contains a dropdown menu and the problem is that the content ...

Tips for choosing an <li> element with JavaScript

<style> .sys_spec_text{} .sys_spec_text li{ float:left; height:28px; position:relative; margin:2px 6px 2px 0; outline:none;} .sys_spec_text li a{ color: #db0401; height:24px; padding:1px 6px; border:1px solid #ccc; background:#fff; dis ...

Choose a specific div element from a collection of dynamically generated divs in Angular

I have been working on a code to dynamically generate div elements using the *ngFor directive. Here is what I have so far: <div *ngFor = "let item of Items"> <p>Item : {{item}} </p> </div> The challenge I encountered is that w ...

How to place an image in the bottom right corner using CSS

Does anyone know how to position an image in the bottom right corner of a div? I have tried using margin-right and padding-right with 0px on the img tag, but it does not seem to work. The black lines indicate that I do not need that space Here is my Cod ...

relocating the input field underneath the button

I need help figuring out how to arrange this. Here's an example link: http://jsfiddle.net/VBS4E/25/ Is there a way to position the input field directly below the button? Like this: ________ __________ __________ | Btn#1 | | Btn#2 | | Btn# ...

Trigger Bootstrap Modal using ASP Razor code within MVC Model value execution

I have a web application built with ASP .NET Core and MVC. The app features a side menu that allows the user to navigate through different pages based on their workflow. For example, when a user logs in for the first time, they are directed to the Home pag ...

Animating components when they first mount in React

I'm attempting to implement an onMount animation in React (and Tailwind if relevant). The code I currently have is as follows: const Component = () => { const [mounted, setMounted] = useState(false) useEffect(() => { setTimeout(( ...

Designing a query feature to explore a Sequel Database utilizing a 'RETRIEVE' approach

In my index.erb, I've created a search bar with the following code: <nav> <div class="nav-wrapper"> <form> <div class="input-field"> <input id="search" type="search" placeholder="Search..." required> ...

Utilizing the '::marker' pseudo-element for generating Markdown-inspired headers

This code snippet is functioning correctly, however, I have a suggestion to make it more appropriate. Instead of using '::before', why not try using '::marker'? I attempted this adjustment but encountered an issue. Can anyone explain wh ...