Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

96
Views
how to remove scrollbar using inline css. I want to do it on just javascript as i created this in just vanilla javascript

code

output

Here is my code and here is the output. I want to remove the scrollbar using just vanilla javascript.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I'm not going to use your code because you provided an image instead of something that can be copy-pasted. But here's your answer:

You can disable scrollbars with inline CSS for FireFox and for IE + Edge.

You can't disable Chrome, Safari, or Opera scrollbars with inline CSS. You must use a <style> tag.

<!-- Disabling scrollbars for Internet Explorer, Edge, and Firefox -->
<html style="margin: 0; padding: 0; -ms-overflow-style: none; scrollbar-width: none">
    <body style="height: 200vh">
        <div style="width: 100%; height: 100vh; background: green"></div>
        <div style="width: 100%; height: 100vh; background: orange"></div>
    </body>
</html>

<style>
    /* Disabling scrollbars for Chrome, Opera, and Safari */
    body::-webkit-scrollbar {
        display: none;
    }
</style>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!