Firefox Style for HTML input Range

I'm encountering a CSS issue with an input-range element:

<input type="range" id="difficultSelect" max="3" min="1" value="2"/>

Here is the CSS code I am using:

-webkit-appearance: none;
z-index: 102;
width: 225px;
height: 5px;
margin-left: 95px;
margin-top: 15px;
border-radius: 2px;

background: linear-gradient(to right, #83f922 0%, #ff4c00 100%); 
background: -webkit-gradient(linear, left top, right top, color-stop(0%, #83f922), 
    color-stop(100%, #ff4c00)); 
background: -moz-linear-gradient(left, #83f922 0%, #ff4c00 100%);
background: -webkit-linear-gradient(left, #83f922 0%, #ff4c00 100%); 

While the background of the slider should display a linear gradient from green to red, it appears correctly in Chrome but in Firefox, along with the background gradient, there is also a normal "grey" bar on top of it: https://i.sstatic.net/x1Z7Y.jpg

Where could I be going wrong? The version of Firefox I am using is 27.0.1.

Appreciate the help!

Answer №1

When it comes to styling the shadow dom of the input in Mozilla, a separate property is used (similar to how -webkit-appearance:none; works for webkit):

::-moz-range-track {background:transparent; border:0px;}

Additionally, you have the ability to customize the slide/grip/button/thumb:

/* It's important to keep these styles separate and not grouped together with a comma */
::-webkit-slider-thumb { /* ... */}
::-moz-range-thumb  { /* ... */}

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

Having trouble importing a component conditionally within a nested component

I am attempting to dynamically import and render one of two components based on the value returned by a prop (lang). If props.lang is set to spanish, then it should import and render a component named <Spain />; otherwise, <UnitedStates />: /* ...

Creating a vertical slider with an unordered list

Looking to create a vertical menu with a fixed height that smoothly slides up and down when the arrow buttons are clicked. I'm struggling to figure out how to properly use offsets to determine where to navigate to. Right now, I am using the relative ...

The session will stay active even after the skill has finished performing a task by setting the parameter "shouldEndSession

I'm encountering an issue regarding my Alexa skill certification. Although I have passed all the requirements, I received feedback that includes the following points: Upon completing a task, the session remains open without any prompt to the user. It ...

Retrieve information from a URL and transform it into a JSON array

One of my functions looks like this: function retrieveJsonDataFromWebsite(url, callback) { let chunks = []; return require('https').get(url, res => { res.setEncoding('utf8') .on('data', (chunk) => { ...

Flex Container Fails to Rearrange When a Flex Item is Dragged Away

Currently, I am using CSS3 flex boxes along with jQuery UI for drag and drop functionality. One issue I am facing is that when I apply justify-content:space-around;, dragging a flex child outside of the container does not cause the remaining items to rear ...

Socket.io: sending signals without receiving any responses

I've been working on a real-time socket.io project that involves a collaborative whiteboard app. I'm facing some issues with emitting data. server.js const express = require('express') const app = express(); const http = require(&apos ...

Problem with CSS layout on Internet Explorer 9

I've encountered some layout difficulties in IE9 and I'm struggling to identify the root of the problem. Even though I'm using Foundation 5, I don't believe that's the issue. The content is within a Foundation grid set at large-12 ...

Positioning a button at the center-right

I'm currently in the process of creating a coming soon website, which you can find hosted here. However, I am having some trouble aligning the button correctly. My goal is to have it positioned to the right of the text field. How can I achieve this? ...

Encountering an error when implementing a router object within a TypeScript class in a Node.js environment

I have a Node.js service written in TypeScript. I am currently working on implementing a separate routing layer within the application. In my app.js file, I have the following code: let IndividualRoute= require('./routing/IndividualRoute'); app ...

Executing blur event in AngularJS

Is there a way to set up an input so that when the length is equal to 5, it triggers a blur event automatically? Any tips on how to achieve this? Here is a basic concept of what I'm looking for: <input type="tel" placeholder="type here." ...

Utilizing CSS Grid to dynamically stretch and wrap rows based on adjacent siblings within a flat DOM structure

Looking for a way to create a grid layout that adjusts row sizes based on adjacent siblings. Interested in SCSS or CSS solutions using grid, flexbox, or other techniques. https://i.sstatic.net/Ump5U.png I am working with a dynamically generated list base ...

Transform an HTML website into a collaborative wiki platform

I currently have a simple HTML website (no JavaScript, PHP, or CSS) with over 1000 pages that I want to transform into a Wiki format. I need a converter to extract the content from each page and create individual wiki pages for them. Additionally, all the ...

retrieving data from array elements

{ "success": true, "users": [ { "photo": { "id": "users/m1ul7palf4iqelyfhvyv", "secure_url": "https://res.cloudinary.com/dpbdw6lxh/image/upload/v1665251810 ...

What could be the reason why this LESS CSS is not taking effect?

Why won't this stylesheet load properly? The desired background color is supposed to be similar to cadetblue. You can view my page with the linked home.less.css at: ...

Features of ES2015's [[class]] attribute

I've been developing a basic clone function var shallowCopy = function (value) { // In ES2017, we could also use // return Object.create(Object.getPrototypeOf(value), Object.getOwnPropertyDescriptors(value)); let propDescriptors = {}; for (le ...

Tips for successfully integrating .dae files into three.js for online execution on a web browser

Hey everyone, I'm an HTML developer who has never worked with WEBGL technology before. I've been trying to figure out how to pass a .dae file into 'three.js' by searching through numerous websites, but I haven't been successful. C ...

Is it possible to modify a specific index within an array stored in Firestore?

How can I modify a specific index within an array stored in Firebase/firestore? export const editComment = (comment) => { return (dispatch, getState, { getFirebase, getFirestore }) => { const firestore = getFirestore(); firestore.collec ...

Mastering the Art of Resizing Video Controls: A

https://i.stack.imgur.com/jTgap.png https://i.stack.imgur.com/Exf6Y.png On the initial screenshot, the video player displays normal controls. However, on the same website with identical CSS, the second video player shows different control settings. // C ...

Issue with IE11: Flexbox with absolute positioning not sizing correctly, fills entire width instead of individual content

Here's a simple case to reproduce the issue: <div style="display: inline-block; position: relative; border: 1px solid black;"> short <div style="display: flex; position: absolute; border: 1px solid black; top: 100%; lef ...

Looking to find a way to identify strings with hyphens in JavaScript?

I am trying to extract specific parts of a URL that follow a certain pattern like the one below: http://example.com/somepath/this-is-composed-of-hypens-3144/someotherpath Specifically, I am interested in extracting the portion of the URL that consists of ...