White edges on Firefox border-radius style

One issue in Firefox is its inability to properly handle the clipping of rounded corner elements, especially when multiple backgrounds are involved. This problem can sometimes be resolved by setting background-clip: content-box within a class for non-absolute elements. However, there are cases where this solution does not work, regardless of other properties applied. On the other hand, Chrome does not experience these problems and handles clipping more effectively. I have provided examples below based on different scenarios that I have recreated using code snippets and screenshots from various browsers. https://i.sstatic.net/6kGtl.jpg

I kindly request not to suggest removing multiple backgrounds and blend modes as they are necessary due to CSS limitations with gradient transitions.

body {
  margin: 0;
}
.wrapper {
  position: relative;
  padding: 20px;
  background-color: #2B3351;
}
.child {
  display: inline-block;
position: relative;
padding: 24px 48px;
text-align: center;
font-family: "Raleway", sans-serif;
font-weight: 900;
font-size: 18px;
text-transform: uppercase;
align-items: center;
color: rgba(255, 255, 255, 0.6);
border-radius: 34px;
background-color: #181B34;
background-image: linear-gradient(160deg, #e6e7f9 11.77%, #ebebfb 74.75%);
background-blend-mode: multiply;
box-shadow: -10px -10px 15px rgba(165, 206, 255, 0.1), 10px 10px 20px rgba(0, 0, 0, 0.35), inset 0 0 0 rgba(165, 206, 255,0), inset 0 0 0 rgba(0,0,0,0);
margin: 24px 0;
background-clip: content-box;
  
}
.absolute {
  position: absolute;
  background-color: #030b33bf;
  background-image: linear-gradient(160deg, #e7ecfd, #FfffFF);
  background-blend-mode: multiply;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transform: translate(150px, -60px);
  box-shadow: -3px -3px 5px rgba(0, 6, 39, 0), 4px 4px 8px rgba(0, 6, 39, .35);
background-clip: border-box;
}
<div class="wrapper">
  <div class ="child"></div>
  <div class="absolute"></div>
</div>

Answer №1

An interesting phenomenon occurs when you set both the background-color and background-image simultaneously with a border-radius. (🤷🏽‍♂️ Who knows why...)

To resolve this issue, simply remove the background-color and retain the background-image gradient. It appears that you are utilizing a background-blend-mode to apply the same background-image to all elements, but you will need to manually input the colors for each gradient stop. If possible, consider using SASS or another preprocessor in your project to streamline the process of selecting the appropriate colors.

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

What could be causing the jQuery Mobile DOM element to return 'undefined' when using .val()?

Currently, I am experimenting with Jquery Mobile and facing an issue where my Form elements are returning 'undefined'. I suspect that the problem lies in the fact that my form may not be created when the onclick() function is triggered by the Mem ...

What is causing the variables in my HTML tags to not appear?

I am currently working on a component to display random products from an array. Despite being able to see the attributes like props.products[random].company when I console log them, they are not rendering properly when placed inside HTML tags. Although th ...

CSS: Adjusting font color for targeted disabled field elements

After researching various solutions, I came across a method to change the font color of all disabled fields by using the following code snippet: input[disabled=disabled] { /* your style */ color: #fff !important; } However, I have multiple disabled fie ...

Top tips for optimizing HTML and utilizing div elements

Could you please provide some insights on how to effectively utilize HTML5 in conjunction with div tags? Below is the snippet of my HTML code. I am incorporating the article tag and have segmented sections, which seem to be in order. However, I am also ...

Can you guide me on where to find the login with Facebook button on this site?

I am currently working on integrating a Facebook authentication system into my app, but I find the default log in button provided by Facebook developers section to be quite unappealing. My Question: I am curious about how websites like Stack Overflow man ...

Learn the process of transferring information through ajax while managing dependent drop-down menus

I have successfully set the initial value from the first combo-box and now I am looking to send the second variable from the second combo-box and receive it in the same PHP file. Below is the Ajax code snippet: $(document).ready(function(){ $(".rutas") ...

Is it possible to rearrange the positions of 2 divs using solely CSS?

I have created a unique design. On iPad, I am assigning the class 'handHeld' to the <body>, which will trigger positional changes between optionsWrapper and #container using CSS classes I've defined below on jsfiddle.net. .handHeld d ...

Resizing rectangular images with CSS/Bootstrap into perfect squares

Imagine there is a rectangular image with dimensions of 1400px (height) x 700px (width). I am looking to turn it into a square while maintaining its original proportions and having white sides added. I specifically do not want to crop the image - I want it ...

Select interest groups with Mailchimp ahead of time

My current project involves utilizing Mailchimp to integrate a subscribe form onto my website, which includes nearly 40 interest groups as checkboxes. To showcase the form in a popup upon clicking, I have implemented jQuery Modal for this purpose. Howeve ...

Change the body selector in CssResource to apply custom styles

I have implemented a CssResource within a ClientBundle following the guidelines provided in the documentation at this link. To access the styles from my UiBinder xml, I have used ui:with as explained in the documentation available at this guide. While th ...

Tips for comparing URLs of the current active tab

Looking to create an adblocker specifically for a certain website. I have successfully implemented code that removes ads on the homepage, but it is still affecting other pages such as movie pages. This results in the deletion of the information section, i ...

How come my Bootstrap container columns are not remaining evenly divided into four parts?

Struggling to split a section of my project into 4 equal parts using the bootstrap col attribute. Unfortunately, every time I try, the last container ends up breaking and shifting below the other 3, creating an unsightly code layout. index.html <sec ...

The JavaScript function triggers a rearrangement of every element on the webpage

The webpage includes a bottom bar styled with CSS: #bottom_nav { position: absolute; bottom: 0; left: 0; border-top: solid 1px lightgray; background: url('http://localhost:3000/assets/font-try.jpg'); height: 70px; wid ...

Exciting transition effect for font sizes in CSS

Issue: Hover over the X and wait for the div to collapse completely. Move away from the X Notice how the div jumps to the bottom and then back up. Inquiry: How can I prevent text wrapping while expanding the div during animation? (Currently using del ...

Is it possible to eliminate all inline styles on a parent element using a child element in CSS?

I'm currently working on an Angular project and I need to remove the styling of the parent element by using the child element, based on certain conditions. It's important to note that the parent element has inline styling. My code looks somethin ...

Adjust the baseline of text in <li> elements by shifting it 2 pixels upwards

My webpage menu is set up with inline "li" elements within a "ul". Each "li" has a colored border and contains an "a" tag. I'm looking to change the text color inside the "a" tag and move it 2px up when hovering over it without affecting the li border ...

Utilizing checkboxes to toggle the visibility of a div element with varying headings

By toggling a checkbox, I aim to show or hide the same div with a different heading. $('#cbxShowHide').click(function() { this.checked ? $('#block').show(1000) : $('#block').hide(1000); }); #block { display: none; bac ...

Showing information on a separate page based on the selected items by utilizing ng-click

I am attempting to display information about various properties on a new screen, which is accessed by clicking on a property name on the main screen. Here's what I have accomplished so far: I have retrieved data from an API and saved it in an array c ...

Implementing a redirection of Dojo Data grid cell values to a different destination

I am working with a Dojo data grid that contains 10 rows (cells) of values. When the first row is clicked, I need it to redirect to another HTML page and carry along the values from the first row. Can you assist me in achieving this functionality? ...

Trouble with Bootstrap 5 Dropdown Functionality

Currently, I am using Bootstrap 5 in conjunction with Django to create a website and I'm encountering difficulties with getting a dropdown feature to work properly. Despite copying the code directly from w3schools, it fails to function when I load the ...