Issue with Firefox hover effect not applying transform:scale

I'm experiencing some difficulties with the border colors when using transform:scale on my element. I want to find out if there is a known solution to this issue. Removing the scale animation resolves the problem and the borders return to normal. I have tried various methods, including scaling up and down, zoom, and adjusting the transform-origin, but none of them seem to fix this strange problem. Interestingly, this issue does not occur in Chrome.
JSfiddle

body {
  background-color: lightblue;
}

.player-chromecast {
  border: 2px solid white;
  border-radius: 4px;
  width: 22px;
  height: 17px;
  position: relative;
  margin: 10px;
}

.player-chromecast:hover {
  transform: scale(1.1)
}

.broadcast {
  background-color: lightblue;
  width: 18px;
  height: 19px;
  position: absolute;
  bottom: -3px;
  left: -2px;
}

.broadcast:after {
  content: '';
  height: 5px;
  width: 5px;
  border-top-right-radius: 20px;
  position: absolute;
  top: 13px;
  background-color: white;
}

.reception {
  border: 2px solid white;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-top-right-radius: 20px;
  position: absolute;
}

.first-bar {
  height: 6px;
  width: 6px;
  top: 8px;
}

.second-bar {
  height: 11px;
  width: 11px;
  top: 3px;
}
<div class="player-chromecast">
  <div class="broadcast">
    <div class="reception first-bar"></div>
    <div class="reception second-bar"></div>
  </div>
</div>

Answer №1

body {
  background-color: #20262e;
}

h1 {
  color: white;
  text-align: center;
}
.player-chromecast:hover .reception {
    border-bottom-color: transparent;
    border-left-color: transparent;
}
p {
  font-family: verdana;
  font-size: 20px;
}

.player-chromecast {
border-left: 1px solid #fff !important;
border: 2px solid white;
border-radius: 4px;
width: 22px;
height: 17px;
position: relative;
margin: 10px;
border-bottom: 1px solid #fff !important;
}

.player-chromecast:hover {
  transform: scale(1.1)
}

.broadcast {
  background-color: #20262e;
  width: 18px;
  height: 19px;
  position: absolute;
  bottom: -3px;
  left: -2px;
}

.broadcast:after {
  content: '';
  height: 5px;
  width: 5px;
  border-top-right-radius: 20px;
  position: absolute;
  top: 13px;
  background-color: white;
}

.reception {
  border: 2px solid white;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-top-right-radius: 20px;
  position: absolute;
}

.first-bar {
  height: 6px;
  width: 6px;
  border-left: 0px;
  top: 8px;
}

.second-bar {
  height: 11px;
  width: 11px;
  border-left: 0px;
  top: 3px;
}
<!DOCTYPE html>
<div class="player-chromecast">
  <div class="broadcast">
    <div class="reception first-bar"></div>
    <div class="reception second-bar"></div>
  </div>
</div>

Please test it on different web browsers and confirm if the hover effect is working as expected without any border issues. Let me know if you encounter any bugs.

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

"Selecting elements using the nth-of-type CSS selector alongside other

Dealing with a grid layout that includes spacers between certain items, I attempted to use the :nth-of-type selector in CSS to style only the first column of items and not apply those styles to the right side. However, it seems that the CSS gets confused w ...

Dynamic content container with customizable sidebar

I have a query that remains unanswered in my research on various CSS layout options. Hence, I decided to share it here. My ongoing project involves a fluid/fixed two-column design. The main content is placed on the left side while the sidebar resides on t ...

What is the best way to eliminate the space between columns?

I have a simple structure on BootStrap. <div class="container"> <div class="row"> <div class="col-md-4 blue-section" ><p>Some content</p></div> <div class="col-md-4 red-section"><p>Some content&l ...

Superimpose two actionlinks and prioritize the one appearing above

I have implemented a menu similar to http://tympanus.net/Tutorials/SlideDownBoxMenu/. Below this menu, I have placed a webgrid. The issue I am facing is that when I hover over the menu, the slidedownbox with two action links pops up directly over the heade ...

Switching from a click event to a hover event in JavaScript

I've been experimenting with animating a burger bar on hover and came across an example online that I managed to adapt for mouseenter functionality. However, I'm struggling to make it revert back to the burger bar shape once the mouse leaves on m ...

Obtain the location of the image source from a text file within an HTML document

I need to create a slideshow displaying a sequence of images. The path to these images will be stored in a text file. How can I read the image paths from the text file? Currently, I have hardcoded code like the example below: <div class="mySlides fade" ...

Customize the color when clicking on a mat-slide-toggle

Whenever I click on the element, a shadow appears in the color that corresponds to the element, which is currently yellow I would like to change that shadow to be green instead, but I am unsure of how to do so. Here is my code: HTML <mat-checkbox i ...

Why is the label on my styled checkbox shifting position?

While custom styling a checkbox, I'm facing an issue where the label next to it keeps shifting. When unchecked, it aligns itself at the bottom of the box, but upon checking, it moves to center align with the box. .check { width: 100%; font-we ...

Can you explain the distinction between "javascript:;" and "javascript:" when used in the href attribute?

Can you explain the distinction between using "javascript:;" and just "javascript:" within an anchor tag's href attribute? ...

Creating a smooth sliding textarea in HTML

I am working on creating an HTML table with numerous text input areas (textarea) that expand downwards when clicked. Currently, the textarea element expands properly but disrupts the layout of the table. My goal is to achieve a design like this Instead o ...

Div sliding out of view

I'm encountering a slight issue with this template: essentially, my goal is to implement a feature where clicking on a box will expand it while simultaneously sliding the other boxes off-screen. However, instead of just sliding the div off-screen, it ...

The content div in CSS is causing the menu div to be displaced

I have encountered a difficulty in describing the issue at hand as I am still in the learning phase and consider myself a beginner. Within my container div, there are two other divs - one for the menu and another for the content. Both of these divs float ...

"Utilizing the 8-column layout feature in Twitter Bootstrap

Is it possible to set up 8 equal columns using the latest version of Twitter bootstrap? I know how to create 4 equal columns but I am struggling with figuring out how to achieve 8: <div class="col-sm-12"> <div class="row"> ...

Tips for dynamically assigning unique IDs to HTML form elements created within a JavaScript loop

let count = 0; while (count < 4) { $('#container').append("<div><input type='textbox' class ='left' id='left-${count}'/><input type='textbox' class ='right' id=' ...

Displaying an image on a jsp page

In my current JSP, within the HTML section, I have the following: <select> <%if(size == 1)%> <option>None selected</option> <%if(size > 1)%> <option>1</option> </select> Additionally, I have this ima ...

Is there a way to update the styling of specific sections of an input field as the user enters text in React?

Just like in most markdown editors, I am looking to enable the ability to modify parts of an input field as the user enters text. For instance: When the user types "_above_", as soon as the second underscore is typed, the text should be styled accordingly ...

The link generated through ERB using link_to cannot be clicked on

When using the ERB link_to helper method to generate a hypertext link to an individual article, I am encountering an issue where the link appears as clickable in the view but is not actually clickable (the cursor does not change to a pointer). I have atte ...

Can you share the outcomes of executing a Node.js program in real-time?

Is there a method to execute a program (such as tcpdump) and have nodejs capture the console output in real-time to display in an HTML format without saving it? I am interested in running a program that displays information in the console, with the capabi ...

Transitioning images smoothly and responsively with jQuery, creating a beautiful

Hey there! I'm looking for some help with transforming this jQuery effect. Instead of having fixed sized images, I want to set the size in percentage (width:100%; height:auto) so they can be responsive. Any creative ideas or suggestions? <scri ...

Is there an issue with the JavaScript functionality of the max/min button?

Help needed with maximize/minimize button functionality as my JavaScript code is not working. Any suggestions for a solution would be greatly appreciated. Thank you in advance. Below is the code snippet: <html> <head> <script> $(functio ...