Utilizing CSS to conceal the scrollbar while allowing scrolling functionality on Firefox


Greetings to all! I have successfully created a navbar similar to apple.com for phone screens that works perfectly on Safari and Chrome.
You can find the code on jsfiddle.
The main CSS used is as follows:

    ul::-webkit-scrollbar { 
        display: none; 
    }
    ul{
        margin: 0px;
        padding: 0px;
        height: 70px;
        list-style-type:none;
        white-space:nowrap;
        overflow-x:auto;
        font-size: 0px;
    }
    li{
        display:inline-block;
        background-color: gray;
        font-size: 20px;
        margin: 0px;
        padding: 0px;
    }


The scrollbar on X axis can be hidden on Chrome and Safari, but not on Firefox.
Is there a way to fix this and make it work on Firefox? If you have any solutions, please share them with me. Thank you so much.

Answer №1

If you want to achieve this effect, you can use the jquery nicescroll plugin

Update:

You can check out this Fiddle for an example

$(document).ready(function() {
    $("ul").niceScroll();
    $("ul").getNiceScroll().hide();
});

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

Struggling to receive a response from request.POST.get within the index function of views.py

I am struggling to develop a web application that shows the IP Address of a hostname entered by the user in a text field. Unfortunately, I keep encountering an error where I can't seem to get a response from the URL. As a beginner in this field, I wou ...

How to distinguish the line in an HTML search bar form using Bootstrap styling

I currently have a search bar form using Bootstrap in my HTML, but I want to add another one within the same bar with a line separating them. Is it possible to implement this? https://i.sstatic.net/Mmnnw.png <form class="d-flex"> & ...

Utilizing IcePDF or PDFBox for converting PDF files into HTML web pages

I am interested in extracting content from PDFs using either IcePDF or PDFBox. However, I am unsure of how to proceed with converting the extracted text and images into HTML web pages. ...

The connection to host 127.0.0.1 on port 7055 timed out after 45000 milliseconds using Firefox version 26.0 and Selenium standalone jar 2.39

I am having trouble connecting to selenium 2.30 with FF version 26.0 on my AWS unix machine. Every time I try to start both the client accessing selenium, I encounter the following error. Interestingly, when I switch to using selenium standalone jar 2.38. ...

The button effortlessly transforms into a sleek email submission form

I have a button that is already styled with basic CSS properties for active and hover states. I would like to add functionality so that when the "Join the Loop" button is clicked, it transforms into a simple email form similar to the one found at Apologie ...

Exploring the functionality of v-chips within a v-text-field

I am trying to implement a search text field using vuetify's v-text-field, and I want to display the user input in a chip (such as v-chip or v-combo-box). However, v-text-field does not seem to support chips based on the documentation. Is there a work ...

How can I retrieve and manipulate the text within an option tag of a form using JavaScript?

<select name="products"> <option value=""> - Choose - </option> <option value="01">table</option> <option value="02">chair</option> <option value="03">book</option> <option value= ...

What are the steps for creating an animated visualization of the peak chart?

As a newcomer to CSS and Javascript, I am currently struggling with animating a peak (bar) chart that I came across on codepen. If anyone can provide assistance or guidance, it would be greatly appreciated! The chart can be found here: http://codepen.io/An ...

Tips for positioning a background image behind page content

I have a webpage with a background image, and now I want to add content that floats over it. However, the code below is placing the content behind the image. How can this be corrected? It's important to note that I'm attempting to achieve the ef ...

What is the best way to align two items where one is centered and the other is positioned to the left?

In an attempt to customize a chat call to action, I am looking to have an icon aligned to the left and some centered text. Here is an example of how I envision it: [ @ Text aligned in center ] Here is what I have tried so far: .icon{ justify-self: ...

What are the steps to embedding a Facebook video on a website?

Could someone please help me with embedding a Facebook video? I tried following the instructions provided at: https://developers.facebook.com/docs/plugins/embedded-video-player Unfortunately, I'm having trouble getting it to work. Here is the sourc ...

Placing the ul tag within a div at the top of the div for proper alignment

I am facing an issue with my code where I cannot get the UL element to appear at the top of the div as it is a child element. <!doctype html> <html> <head> <title>xxx</title> </head> <body> <div id="page" style ...

org.openqa.selenium.SessionNotCreatedException: Error occurred when attempting to launch Firefox version 37 using Selenium version 3.11.0 due to incompatible capabilities

When attempting to test a website in Firefox, I encountered an error stating "The path to the driver executable must be set by the webdriver.gecko.driver system property;" Despite setting the path correctly, I am unsure of where the issue lies. Here is a s ...

Traditional alignment challenges arise when trying to position two elements in a row using HTML and CSS

Greetings to the community of stack overflow! I am facing a mundane issue with two elements (refer to code snippet below) that requires my attention. Any help or advice would be greatly appreciated. I am aiming for the final output to resemble this: With ...

What is the method for modifying the chosen color using a select option tag instead of a list?

element, I have a Vue component that features images which change color upon clicking a list item associated with that color. <div class="product__machine-info__colors"> <ul> <li v-for="(color, index) in machine.content[0] ...

An odd issue has arisen where the website functions properly in Firefox 3.0 but encounters problems when accessed in Firefox 3

Could someone investigate this issue for me? When you click on the showcase and then on the logo, a modal window should open with the logo. It works perfectly in FF 3.0, but in FF 3.5, the tab switches from showcase to home after clicking the logo. Even ...

The card's shadow effect is not functioning properly because the hover feature is not working correctly

I'm having an issue with getting the cards ('.card', '.card p' and '.card p:hover' classes) to darken their shadow upon hovering over them, unfortunately nothing happens. However, the hover function on the navigation bar ...

What is the solution for adjusting the positioning of the `<select>` element in Bootstrap?

Here is a snippet of HTML code: <button class="btn">hello</button> <select class="input-small"><option>1</option></select> <button class="btn">world</button> The position of the select element is not correc ...

In Python using Selenium, the text property of a WebElement may cut off duplicate whitespaces

Today, I came across an interesting observation regarding the text property of WebElement. Here is a PDF link that sparked my curiosity: https://i.stack.imgur.com/1cbPj.png Upon closer inspection, I noticed that the file name contains triple whitespace. W ...

Converting the pictures to black and white by utilizing jQuery and adjusting the opacity

I have been attempting to convert my images to grayscale using CSS, but have encountered an issue with Firefox where it requires the use of SVG. However, utilizing SVG causes problems with other functionalities such as opacity and transitions. Is there a ...