Are you experiencing a strange problem with the CSS button when hovering, clicking, or with the border?

Check out the code for this implementation on jsfiddle: https://jsfiddle.net/xuhang1128/cmkbu07s/2/ I utilized React and React-bootstrap to create it.

.design2-statusMonitor {
    margin-top: 20px;
    .list-group-item {
        display: inline-block;
        background-color: transparent;
       // border: none;
        border-right: 1px solid #CAD5E0;
        border-top: 1px solid #CAD5E0;
        border-bottom: 1px solid #CAD5E0;
        width: auto;
        &.selected {
            background-color: #2f749a;
        }
    }

    .list-group-item:after {
        content: "";
        width: 9px;
        height: 9px;
        position: absolute;
        right: -6px;
        top: 43%;
        z-index: 2;
        background-color: white;
        border-top: 2px solid #CAD5E0;
        border-right: 2px solid #CAD5E0;
        transform: rotate(45deg);
        -moz-transform: rotate(45deg);
        -webkit-transform: rotate(45deg);
    }

    .list-group-item.selected:after {
        content: "";
        width: 9px;
        height: 9px;
        position: absolute;
        right: -6px;
        top: 43%;
        z-index: 2;
        background-color: #2f749a;
        border-top: 2px solid #CAD5E0;
        border-right: 2px solid #CAD5E0;
        transform: rotate(45deg);
        -moz-transform: rotate(45deg);
        -webkit-transform: rotate(45deg);
    }


    .list-group-item:hover {
        background-color: #c0d5e0;
        color: white;
    }
    .list-group-item:hover:after {
        background-color: #c0d5e0;
    }
}

When clicking on a bubble button, you may notice that the triangle appears abnormal. Here's an image showcasing the issue: https://i.sstatic.net/8bdIC.jpg However, when I move the mouse away from the button and click elsewhere, the button returns to normal state?

If anyone could assist me in resolving this issue, I would greatly appreciate it. I have researched extensively but haven't found a solution yet.

Answer №2

After pressing a button, it becomes focused and an outline is displayed.

To remove this outline, simply add the following code:

outline:none;

https://jsfiddle.net/cmkbu07s/5/

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

jQuery - Event cannot be triggered on the 'deselect' or 'focusout' of <option> tag

Check out the demo here Hello there, I have a situation where I need an input box to appear below a select option, only if the user selects "Other". The code currently uses the .click() function on the option, but now I am trying to make the input box di ...

Using a for loop to showcase data in Timeline component of Material-UI in React

I have a JSON data that looks like this: [ { "module_id": 2, "module_type": "Instructional", "module_name": "Introduction and Course Overview", "duration": 30, ...

Automatically relaunch NodeJS application upon app failure

I am looking for a way to automatically restart my NodeJS (Express) app after crashes with errors. I am familiar with the forever npm package, but all the examples I found were for running the app in development. My goal is to implement this in production ...

Methods for submitting POST requests with key data enclosed in quotation marks?

Upon investigation, I discovered that the Request Payload object's key does not have quotation marks as shown below. However, I am interested in sending a request with keys that are marked with quotations. Interestingly, when I attempted to send a re ...

Implementing custom CSS styles to a component in real-time with ng-style

When I use an angularjs component to create stylized pictures, the style is not applied correctly on the first visit to a page (refreshing the page shows the correct style). The CSS that should be applied is generated dynamically based on the height and wi ...

Navigating through a JSON object in JavaScript by employing regular expressions

Is there a way to extract the "Value" of elements "Data1", "Data2", "Data3", "Data4" from a JSON object without resorting to regex? I've heard that using regex with JSON is not recommended. <script> abc = { "model": { ... } } </script> ...

The background image and svgs are not displayed on laravel localhost/public/index.php, but they appear when using "php artisan serve"

I've created a beautiful Laravel project on my PC. The welcome.blade.php file in the project has a background image located in the: public/images/ directory. To display the images, I've used the following CSS: html, body { color: #f4f6f7; ...

How to align items at the center in material-ui styling

I have a row of cards inside a container that I want to align in the center with equal spacing around them. I am using the material-ui UI library for the layout. Despite adding the justifyContent: center property, the cards are not evenly spaced. This is ...

What is the optimal method for iterating through every element in a string array?

Within my code, I am dealing with an array named var mya = ["someval1", "someotherval1", "someval2", "someval3"];. The goal is to have a function that receives an object with a property set to one of these values. Instead of simply iterating over the arra ...

Generating a bullet list from an array of objects

Looking to create an unordered list with vanilla JS, using an array of objects to populate the list. Struggling a bit on how to accomplish this. Here is my current code: let myObj = [ {name: "Harry Potter", author: "JK Rowling"}, {name: "Hunger Gam ...

Both Firefox and Chrome are unable to properly decode base64-encoded image or pdf files

I'm having trouble displaying base64 encoded images on Chrome and Firefox browsers using the data uri scheme. My current HTML code is: <img src="data:image/png;base64,base64_string_here" alt="base64 image name" width="600" height="400" border= ...

SmartAlbum CameraRoll in react-native is a feature that allows for

Is it possible to fetch photos from the camera roll filtered by smart albums such as Selfies and Screenshots? I tried this code snippet: CameraRoll.getPhotos({ groupName: 'Favorites', groupTypes: 'Library', first: 36 }) .then((data) =& ...

Using preventDefault in the compositionend event does not make any difference

var inputNode = document.getElementById('view_1'); inputNode.addEventListener('compositionend', function(e) { console.log(e.cancelable); // true e.preventDefault(); }); <div id="view_1" class="view" contenteditable="true> &l ...

JavaScript issue: Shallow copy does not reflect updates in nested JSON object

Within my coding project, I came across a nested JSON object that looks like this: var jsonObj = { "level1" : { "status" : true, "level2" : {} // with the potential to extend further to level 3, 4, and beyond } } My objective is si ...

What could be causing me to consistently receive a 0 value despite my collection having content stored within it?

How can I retrieve the value of dropVolume and use it in another method after executing my getAllDropsVolumePerDate(date) function? Each time I try to access dropVolume, it returns a value of 0. dropVolume = 0; getAllDropsVolumePerDate(date: string) { ...

What impact do the input values of an Angular reactive form have on the DOM?

I am currently working on developing a UI wizard app using Angular (reactive forms) version 6/7. The main purpose of this app is to enhance the product page of an ecommerce platform such as Shopify or WordPress. I am utilizing angular material radio inputs ...

What is the best way to ensure that the input areas stretch all the way to the edge of the screen?

This form is structured similar to Bootstrap: HTML: <div class="container"> <div class="row"> <div class="form-group row-group"> <label class="col-6">First name</label> <input class="col-6" type="text" v ...

How to Efficiently Remove Array Elements by Index in Typescript

What is the best way to remove an item by its index using Typescript? For example: let myArray = ['apple', 'banana', 'cherry', 'date']; // How can I delete the item at index 2? ...

Tips on importing anime js after it has been successfully installed through npm

Today, I added anime js as a dependency to my package.json file. The version 3.0.1 is visible in the dependencies list. I used npm to install it. Next step was creating a folder and a JavaScript file in the public directory. I set up a simple event liste ...

Activate jQuery function upon clicking a bootstrap tab

When I click on a Bootstrap tab, I want to trigger an AJAX function. Here is the HTML code: <li><a href="#upotrebljeni" data-toggle="tab">Upotrebljeni resursi</a></li> The jQuery AJAX function looks like this: $('a #upotreb ...