Steps to create a customized on-click effect for the search button

I have created the following:

https://i.sstatic.net/Eu9kh.png

And I am aiming for this:

https://i.sstatic.net/maKCM.png

Both search bars have on-click states but I am struggling to achieve this using bootstrap, CSS, JS.

Can someone guide me on how to implement this feature?

Code:

.loc-icon{
  background-color: white;
  border: none;
  border-radius: 15px;
  padding: 15px
}

.loc-input{
  border: none;
  padding: 15px;
  border-radius: 15px;
}

.loc-submit{
    background-color: white;
    border: none;
    border-radius: 15px;
    padding-right: 1rem;
}
<div class="input-group mb-3 loc-bar">
    <span class="input-group-text loc-icon" id="inputGroup-sizing-default"><img src="Images/place.png" alt=""></span> <!-- location icon -->
    <input type="text" class="form-control loc-input" aria-describedby="inputGroup-sizing-default" placeholder="Enter your location">
    <button class="loc-submit " type="submit" name="button"><a href="/"><img src="Images/right-arrow.png" alt=""></a></button>
  </div>

Seeking assistance on this!!

Thank you to all the amazing people out there.

Answer №1

It appears that you are looking to eliminate the focus outline, and this can be done by applying the class shadow-none. For more information, you can check out this link

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

Creating a table with React components to display an object

I'm a React novice struggling to render an object in a table. While I can access the ctx object using console.log, I can't seem to display it in the table on the browser. Any help and advice would be greatly appreciated. The code snippet is provi ...

A beginner's guide to integrating Socket.io with Express.JS using the Express application generator

Currently, I am attempting to utilize Socket.io alongside Express.JS by using the Express application generator. While searching for solutions, I came across some helpful advice on how to achieve this (check out Using socket.io in Express 4 and express-gen ...

Resizing Image-maps and images on the fly with maphilight.min.js

In relation to the question about dynamically resizing image-maps and images, I found a helpful solution provided by Teemu. I adapted it for my own purposes and you can view my version on jsfiddle. However, when trying to apply this solution to my project ...

Make sure to assign an id to the ng-template when using an Angular Bootstrap accordion

I'm struggling to assign a dynamic id to the heading template. I attempted to use id="{{group.title}}" but it doesn't seem to be working. Any assistance or suggestions would be greatly appreciated! <div ng-controller="AccordionDe ...

Experience seamless slide transitions with the react-slick carousel using scroll events in React JS and JavaScript

Currently utilizing the carousel library found at: react-slick I am interested in enabling mouse scroll functionality to navigate through each slide. The idea is to scroll up to progress forward and scroll down to go backward. Came across a relevant exa ...

Extracting numbers using regular expressions can be tricky especially when dealing with mixed

Currently, I am attempting to create a javascript regex that can extract decimal numbers from a string containing a mix of characters. Here are some examples of the mixed strings: mixed string123,456,00indeed mixed string123,456.00indeed mixed string123,4 ...

Angular image source load test encountered an error

<div class="col-xs-4 col-sm-4 col-md-4"> {{jsonData[current].profilepic}} <div ng-if=IsValidImageUrl(jsonData[current].profilepic)> <img id="pic" ng-src="{{jsonData[current].profilepic}}" alt=""/> </div> < ...

Ways to troubleshoot the "TypeError: Cannot read property 'value' of null" issue in a ReactJS function

I keep encountering a TypeError: Cannot read property 'value' of null for this function and I'm struggling to pinpoint the source of the issue. Can someone help me figure out how to resolve this problem? By the way, this code is written in R ...

Revamp your code by utilizing ES6 class to replace multiple if statements in Javascript

Currently, my code is filled with numerous if statements and I am considering a switch to classes in ES6. However, Javascript isn't my strong suit... so PLEASE HELP ME..! Previous code: //example code function first(){ console.log('first sce ...

Arranging the R shiny selectInput controls in the correct position

I am looking for help with adjusting the position of two selectInputs in my R Shiny script. Currently, the dropdown is not appearing clearly and I've tried using padding without success. I have attached a snapshot for reference. Any assistance would b ...

Preventing Scope Problems in AngularJS

Spending more than 4 hours trying to figure out why my ng-model directive was not correctly binding with ng-options within my controller was frustrating. The <select> element seemed to be initialized properly, receiving a value from the parent scope, ...

Control the value dynamically with Powerange using JavaScript

I have incorporated the Powerange library into my form for creating iOS style range bars. This javascript library offers a variety of options provided by the author. Is there a method to programmatically move the slider to a specific value using JavaScrip ...

Difficulties encountered when trying to load a URL or API that contains an array in javascript/p5js

I've run into a coding issue that I'm trying to troubleshoot in p5js. My goal is to retrieve data from a URL/API. The line `kursMin[1]...` gives the correct stock value, but the line `kursMin[i]` returns `[object Object]2021-03-124. close` Bo ...

MVC5 Toggle Button for Instant Display and Concealment

I used to utilize this method in Web Form development by targeting the id and name of the input radio button. However, I am encountering difficulties implementing it in MVC5. Can someone kindly point out where I might be going wrong? Upon selecting a radi ...

When refreshing the page, redux-persist clears the state

I have integrated redux-persist into my Next.js project. The issue I am facing is that the state is getting saved in localStorage when the store is updated, but it gets reset every time the page changes. I suspect the problem lies within one of the reducer ...

The selection feature is not supported for the type of input element in jQuery

I'm currently attempting to utilize AJAX to send a form with jQuery. However, upon clicking the submit button (which is technically a link), I encountered an error. The error displayed in the console is as follows: Failed to read the 'selection ...

Difficulty understanding D3 Angular: color fill remains unchanged

While developing an angular application with D3 JS, I encountered an issue with changing the fill color of an SVG. Upon reviewing the code, I noticed that I created one SVG and attempted to insert another one from a vendor: function link (scope, element, ...

How can you use a selector to filter Cheerio objects within an `each` loop?

As I work on parsing a basic webpage using Cheerio, I began to wonder about the possibilities at hand: Consider a content structure like this: <tr class="human"> <td class="event"><a>event1</a></td> <td class="nam ...

What could be causing the jQuery news ticker to malfunction on my site?

I recently made some changes to my main page by embedding HTML and adding the following code/script: <ul class="newsticker"> <li>Etiam imperdiet volutpat libero eu tristique.</li> <li>Curabitur porttitor ante eget hendrerit ...

A guide to setting up a Python CGI web server on a Windows operating system

I am looking to set up a basic Python server on a Windows system to test CGI scripts that will ultimately run on a Unix environment. However, when I access the site, it displays a blank page with no source code visible. I am struggling to identify the issu ...