I'm looking to incorporate my custom CSS styles within tailwindcss, but unfortunately, it doesn't seem to be

I'm currently working with next.js and tailwindcss.
I'm trying to remove the scroll bars from my website.
I attempted to hide the scrollbars by adding custom styles in style.css, but unfortunately, it didn't work as expected.

@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
body::-webkit-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
  display: none;
}

Answer №1

When adding to it, make sure to include the following code:

@layer base {
    body::-webkit-scrollbar {
        -ms-overflow-style: none;
        scrollbar-width: none;
        display: none;
    }
}

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

The getServerSessoin function in NextJS13 with the /app directory and next-auth module is responsible for returning the session, whereas the use

Here are some important points to note: The sessions are stored in a database using next-auth. The middleware.ts file does not have access to getServerSession. The getServerSession function returns a session in server components. In client components, the ...

I'm curious why I can only see the HTML code and not the three.js code as well

I attempted to run a sample three.js game today, but only the HTML code appeared. I've also installed three.js with npm and tried running it with the VSC Live Server, but it's not working. You can find the source code here. What should be my nex ...

Zod faces a challenge while parsing environment variables in Nextjs 14 due to an unexpected error

I encountered an error while parsing my environment variables using zod in my Next.js 14 project: ZodError: [ { "code": "invalid_type", "expected": "string", "received": "undefined", ...

What could be causing the font of the background text to change when CSS3 animation is applied?

Have you ever noticed a font style change in the background text when applying CSS3 animations for opacity and scale transforms? I have some text content on my page, including a "Click me" link that triggers a popup with a CSS3 animation. However, I'v ...

What is the best way to rearrange three divs into two columns?

I am trying to rearrange the order of three divs in my markup layout. The desired layout is to display div one first, followed by three underneath it in the first column. Then, in the second column, I want to only show div two. My current CSS configuratio ...

The pictures are not appearing on my local website

After completing the following steps: Node.js was successfully installed In the command prompt, I entered: npm install http-server -g Navigated to my website files located in cd user/me/local In Google Chrome, I typed: localhost:8080 Upon opening my HTML ...

Generating divs dynamically with inline styling and utilizing ngFor, while incorporating a conditional check with ngIf in Angular

Currently, I have an Angular component where I am dynamically generating div elements using the ngFor directive. However, I also need to validate a condition before creating each div, and I'm facing challenges when trying to use both ngFor and ngIf in ...

Combining Next.js with RTK Query: Exploring the fusion of server-side rendering and data fetching in RTK

I am looking to showcase a static listing with cached HTML upon the initial page load, utilizing data fetched from the server side. There will be no loading indicator displayed during the initial render, as I intend to exhibit cached HTML data fetched from ...

What is the process for designing a menu with animated scaling effects?

I have a design file in PSD format that looks like this. https://i.sstatic.net/R46Ko.jpg My goal is to create a website similar to , where when a user hovers over a link, a circle will appear around it. I am using Bootstrap 4.5 for this project. Here is ...

Top method for setting a cookie in the App router server component using NextJS

I am faced with a task that involves updating a flag in the database and creating a cookie with a 5-minute expiry time whenever a page is loaded. Furthermore, upon subsequent page loads, I need to check if the cookie has expired, update the flag, and gener ...

What is the best way to preload Google fonts prior to the page loading?

Currently, I am working on a new project that can be found at this link: Whenever I visit this website, it briefly displays the default sans-serif font before loading Bebas Neue. Is there a way to prioritize loading the font from Google first and then dis ...

Iterating over an array of objects and executing asynchronous operations

I am currently working with NextJS and managing an array of assets (images) within my state. The task at hand is to post these images to the API. To accomplish this, I have a specific object that handles the posting process using the following syntax: let ...

CSS: Ancestor menu disappears when sub menu is hovered over

The webpage in question has an interesting interactive feature: Upon hovering over the "About Us" menu item, the background transitions to black with white text. Subsequently, when moving onto the sub-menu item "Meet our team", the original content under ...

Finding an element that lacks both a class and an id, and is not consistently present - what's the trick?

Currently, I am faced with a predicament in my code where a <li> element only appears under specific conditions, making it difficult to apply positioning. This element lacks an id and class attribute, which prevents me from targeting it accurately us ...

Using jQuery to generate columns depending on the quantity of occurrences of an element inside a specific Div

I've encountered a challenge while using a plugin that restricts access to the HTML, but allows for adding CSS and Javascript. I am aiming to achieve the following: Determine if a specific class within a div is active If it's 'active' ...

the div's width isn't getting larger

Check out my code snippet: <script> var change = function(){ alert("sam"); for(var i; i >=200; i++){ var z = String(i); var x= document.getElementById("div1"); x.style.width = z; } }; </script> < ...

Understanding ng-if in AngularJSAngularJS includes a useful directive called ng

After using angularJS, I found myself wondering how to effectively implement its if statement in a particular way. I hope that my example will help clarify my question. Here is the if statement I am working with: <div data-ng-if="book.Availability> ...

The webview is failing to display the dropdown menu

Everything seems to be working fine with the 3 dropdown menus on this website, as they appear on top of the images below them. However, when I convert the site into an Android app using Webview, the menus end up going under the images instead of on top. ...

What is the best way to incorporate external CSS files into AMP?

Struggling to load external CSS files such as bootstrap.css and other stylesheets into an HTML file that is AMP-compatible. I've scoured the AMP documentation but have yet to find a solution. As a newcomer to both AMP and SEO, I need to implement SEO ...

Say goodbye to tables and hello to CSS div layouts!

Is there a way to align three or four elements without relying on tables? I want them to follow this format: The reason I am asking is because my current method involves using tables, but they are not allowing me to set a specific height for the "test" bo ...