DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
accessibility

Why the Scroll Bar Is Not Showing on a Web Page (and How to Fix It)

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A scrollbar appears only on a scroll container whose content is larger than its available box and whose CSS allows scrolling. The usual fix for a panel is a real height or maximum height plus overflow-y: auto. If the page is still scrollable but the bar is invisible, an operating-system overlay setting or a rule such as scrollbar-width: none may be hiding the control.

First, identify what is (and is not) happening

There are three different symptoms that are often described as “no scrollbar”:

  • The content fits. With overflow: auto, the browser has no reason to draw a bar when the content is shorter than the container.
  • The page scrolls, but no track remains visible. Your browser or operating system may use overlay or auto-hidden scrollbars that appear only while scrolling.
  • The content is clipped or the page cannot scroll. An ancestor may have overflow: hidden or overflow: clip, or scrolling may have been assigned to a different element.

Open DevTools, select the element you expect to scroll, and compare its scrollHeight with its clientHeight. If scrollHeight is greater, vertical content exists outside the visible box. If the two values are equal, there is no vertical overflow in that element; adding a scrollbar rule alone cannot create one.

What each overflow value actually does

CSS When content overflows Can the user scroll? Scrollbar behavior
overflow: visible Content paints outside the box. Usually the element does not become a scroll container; the document may still scroll. No scrollbar is created for that element.
overflow: auto Content is clipped inside the box. Yes, with wheel, touch, keyboard focus and script where supported. Shown only when needed. Overlay systems may show it only during interaction.
overflow: scroll Content is clipped inside the box. Yes. Requests scrollbars in both directions even when content fits, but an operating system can still render an overlay or auto-hide it.
overflow: hidden Content is clipped at the padding box. Limited keyboard or scripted movement can still occur, but there is no visible scrollbar. None.
overflow: clip Content is clipped. No scrolling, including programmatic scrolling. None.

For a normal constrained panel, overflow-y: auto is the appropriate starting point. Use overflow: scroll only when reserving a scrollbar is a deliberate design choice. If you want stable layout space without forcing a painted bar, combine overflow-y: auto with scrollbar-gutter: stable.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
  • Compact Mouse: With a comfortable and contoured shape, this Logitech ambidextrous wireless mouse feels great in either right or left hand and is far superior to a touchpad
  • Durable and Reliable: This USB wireless mouse features a line-by-line scroll wheel, up to 1 year of battery life (2) thanks to a smart sleep mode function, and comes with the included AA battery
  • Universal Compatibility: Your Logitech mouse works with your Windows PC, Mac, or laptop, so no matter what type of computer you own today or buy tomorrow your mouse will be compatible
  • Plug and Play Simplicity: Just plug in the tiny nano USB receiver and start working in seconds with a strong, reliable connection to your wireless computer mouse up to 33 feet / 10 m (5)
  • Better than touchpad: Get more done by adding M185 to your laptop; according to a recent study, laptop users who chose this mouse over a touchpad were 50% more productive (3) and worked 30% faster (4)

Seven checks in DevTools

  1. Find the actual scroll container. Starting at the visible panel, inspect its parent, then the page’s body and html. The scrolling element is normally the one whose scrollHeight exceeds clientHeight.
  2. Check computed overflow. Look for overflow-y: hidden, overflow: clip, or a shorthand overflow rule that overrides your declaration. Check ancestors as well as the selected element.
  3. Check dimensions. A scroll container needs a constrained height, such as height, max-height, a flex track, or a grid track. If it grows with its content, there is nothing inside it to scroll.
  4. Inspect padding and box sizing. Overflow is measured against the element’s padding box. Large padding, borders, or a global box-sizing rule can change the space available for content.
  5. Test a known overflow. Temporarily add a long list or set a small height. If a bar appears, your original content simply fit. Remove the test after diagnosis.
  6. Scroll every candidate. In an application shell, a fixed wrapper may scroll while the document remains fixed. Put overflow-y: auto on the element users are expected to scroll, not on an arbitrary child.
  7. Check the browser and operating system. Scroll once with a wheel, trackpad or touch gesture. If content moves and the bar flashes briefly, the platform is using overlay or auto-hidden scrollbars rather than a persistent gutter.

Reliable CSS patterns

A panel that scrolls only when necessary

.panel {
  max-height: 70vh;
  overflow-y: auto;
}

This keeps the panel from growing beyond 70 percent of the viewport and lets the browser add a vertical scrollbar only when its contents exceed that space. Replace the maximum with a height or a layout-derived value when the panel must occupy an exact region.

A scrollbar track reserved even when the panel is short

.panel {
  overflow-y: scroll;
}

This requests a classic scrollbar in both directions. It can prevent layout shifts when content changes, but it may leave an empty horizontal track and does not defeat overlay-scrollbar settings.

Stable space without forcing a visible track

.panel {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

The gutter reserves layout space for a classic scrollbar while retaining “only when needed” behavior. On systems that draw scrollbars over content, the visual result remains platform-dependent.

A full-page document

Let the document grow naturally whenever possible. Avoid placing overflow: hidden on html or body unless a modal, drawer or other interaction intentionally takes ownership of scrolling. When that interaction ends, restore the previous overflow value. For a page that should scroll vertically, a common baseline is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Logitech G305 Lightspeed Wireless Gaming Mouse - Black
  • The next-generation optical HERO sensor delivers incredible performance and up to 10x the power efficiency over previous generations, with 400 IPS precision and up to 12,000 DPI sensitivity
  • Ultra-fast LIGHTSPEED wireless technology gives you a lag-free gaming experience, delivering incredible responsiveness and reliability with 1 ms report rate for competition-level performance
  • G305 wireless mouse boasts an incredible 250 hours of continuous gameplay on just 1 AA battery; switch to Endurance mode via Logitech G HUB software and extend battery life up to 9 months
  • Wireless does not have to mean heavy, G305 lightweight mouse provides high maneuverability coming in at only 3.4 oz thanks to efficient lightweight mechanical design and ultra-efficient battery usage
  • The durable, compact design with built-in nano receiver storage makes G305 not just a great portable desktop mouse, but also a great laptop travel companion, use with a gaming laptop and play anywhere
html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-y: auto;
}

Do not add a fixed height: 100vh to the document merely to make a layout fill the screen. If the content then fits inside that fixed box, no document overflow exists; if a child is clipped by an ancestor, the page can appear stuck.

Flex layouts: allow the intended child to shrink

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.main {
  min-height: 0;
  overflow-y: auto;
}

Flex items have an automatic minimum size that can prevent the scrolling child from becoming smaller than its content. Setting min-height: 0 on the intended scroll region lets it use the remaining track and overflow internally. For a horizontal flex layout, the equivalent issue is usually solved with min-width: 0.

Grid layouts: give the scroll track a finite size

.app {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
}

.main {
  overflow-y: auto;
}

minmax(0, 1fr) prevents the content row from expanding to its intrinsic minimum and leaves the remaining viewport space for the element that should scroll.

Why 100vh can make scrolling appear to stop

A fixed viewport-height wrapper creates a boundary. If its child is taller but the wrapper or an ancestor clips overflow, the extra content is unreachable. Decide which behavior you want:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Logitech M185 Compact Ambidextrous Wireless Mouse with Rubber Grips - Blue
  • Compact Mouse: With a comfortable and contoured shape, this Logitech ambidextrous wireless mouse feels great in either right or left hand and is far superior to a touchpad
  • Durable and Reliable: This USB wireless mouse features a line-by-line scroll wheel, up to 1 year of battery life (2) thanks to a smart sleep mode function, and comes with the included AA battery
  • Universal Compatibility: Your Logitech mouse works with your Windows PC, Mac, or laptop, so no matter what type of computer you own today or buy tomorrow your mouse will be compatible
  • Plug and Play Simplicity: Just plug in the tiny nano USB receiver and start working in seconds with a strong, reliable connection to your wireless computer mouse up to 33 feet / 10 m (5)
  • Better than touchpad: Get more done by adding M185 to your laptop; according to a recent study, laptop users who chose this mouse over a touchpad were 50% more productive (3) and worked 30% faster (4)
  • Document scrolling: remove the unnecessary fixed height and let the body expand.
  • Application-shell scrolling: keep the viewport-sized shell, give the main region a finite flex or grid track, set min-height: 0 where needed, and apply overflow-y: auto to that region.

Also inspect nested wrappers created by components, routers and modal libraries. One overflow: hidden declaration several levels above the content can remove the only usable scroll path.

When the operating system is hiding the bar

Classic scrollbars occupy a gutter beside the content. Overlay scrollbars are drawn over the content and can be transparent until you scroll. Browser and operating-system settings determine which style is used. Before changing CSS, test wheel, keyboard and touch scrolling and, if appropriate, enable the operating system’s “always show scrollbars” option.

A persistent track is not the same as scrollability. Keyboard users should be able to focus the region and use the arrow keys, Page Down, Home and End; touch users need a visible or otherwise discoverable gesture. Do not remove a functional scrollbar simply because it is visually inconvenient.

Rules that intentionally hide scrollbars

Search your stylesheets for:

scrollbar-width: none;

/* Chromium/WebKit-specific examples */
::-webkit-scrollbar {
  display: none;
}

scrollbar-width: none leaves the element scrollable but removes its control. MDN warns that this can make content difficult or impossible to scroll for some people. Remove the rule unless you provide an equally discoverable alternative, such as clear drag, wheel, touch and keyboard behavior. Use overflow: clip only when hiding and disabling overflow is intentional; it is not a cosmetic scrollbar fix.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
  • Computer mouse for easily navigating a computer interface; click, scroll, and more
  • USB-A wired connection; if existing device only supports USB-C, an additional adapter will be required
  • High-definition (1000 dpi) optical tracking ensures responsive cursor control for precise tracking and easy text selection
  • 3 buttons offer effortless fingertip control
  • Plug-and-go ready for instant use

Common failure cases and the precise fix

  • “I set overflow-y: auto, but nothing changed.” Confirm that the element has a constrained height and that scrollHeight > clientHeight. If not, the content fits or the wrong element was selected.
  • “The page scrolls with the wheel, but no bar stays visible.” This is normally overlay or auto-hidden behavior. Scroll to reveal it or change the system setting; do not assume the page is broken.
  • “The bottom of a modal is unreachable.” Give the modal body, not the entire page, a finite height and overflow-y: auto. Check that a backdrop or dialog ancestor is not clipping it unexpectedly.
  • “The header is fixed and the content is trapped.” Put the fixed height on the shell, calculate the remaining flex or grid track, add min-height: 0, and scroll the content region.
  • “A horizontal bar appears instead.” Use overflow-y and inspect wide children, long unbroken strings and transforms. Avoid globally setting overflow: hidden, which can hide the vertical problem while clipping content.
  • “JavaScript says it can scroll, but users cannot.” Check for overflow: hidden, scrollbar-width: none and focus traps. A script can move hidden content even when no visible control exists.

Accessibility and cross-platform testing checklist

  • Test with a mouse wheel, trackpad, touch, keyboard and a screen reader or keyboard-only workflow.
  • Verify that focus can reach controls below the fold and that focus is not trapped in a clipped region.
  • Test a short dataset and a long dataset; auto should change behavior when overflow begins.
  • Check at narrow and wide viewports, browser zoom levels, and the operating systems your users actually run.
  • Confirm that dialogs restore document scrolling after they close.
  • Prefer content-driven document height; use an explicitly sized scroll region only where the interface requires one.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If you need repeatable screenshots while diagnosing a layout, ScreenshotNeo is a website screenshot API and MCP server. It can capture a page at a chosen viewport so you can compare the “before” and “after” state without manually opening a browser. Its cleanup step accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each step can be disabled.

Use the API documented at https://screenshotneo.com/docs/. The following calls are runnable; replace the URL and key with your own values.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Only clean shots are billed. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and the response identifies the result with X-Page-Verdict and X-Billed headers. An MCP server provides take_screenshot, get_page_info and capture_pdf tools to Claude, Cursor and other MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account to try it.

FAQ

Can CSS force a scrollbar to remain visible on every device?

No. overflow: scroll requests a scrollbar, but overlay and auto-hide policies are controlled by the browser and operating system. You can reserve layout space with scrollbar-gutter: stable, not guarantee a permanently painted track.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why does changing the browser zoom alter the scrollbar?

Zoom changes the effective viewport and the amount of content that fits in a fixed or maximum-height box. Recheck the container’s computed dimensions and its scrollHeight at the zoom level where the issue occurs.

Best Value
Acer Wireless Mouse for Laptop, 2.4GHz Computer Mouse 3 Adjustable 1600 DPI
  • 【Plug and Play for Home/Office/School】The wireless computer mouse features 2.4GHz connectivity, delivering a stable, interference-free connection up to 32ft. Designed for 𝐦𝐞𝐝𝐢𝐮𝐦 𝐭𝐨 𝐥𝐚𝐫𝐠𝐞 𝐬𝐢𝐳𝐞𝐝 𝐡𝐚𝐧𝐝𝐬, it ensures comfortable use all day. Simply plug in the USB-A receiver for instant pairing—no drivers needed. 📌📌 If the mouse isn’t suitable, place the USB receiver in the battery compartment and return both.
  • 【3 Levels Adjustable DPI】This travel USB mouse offers 3 adjustable DPI settings (800, 1200, 1600), allowing you to customize sensitivity for precise design work. Effortlessly switch to match your task and elevate your productivity. 📌 Please remove the film at the bottom of the mouse before use.
  • 【Effortless Browsing】Equipped with forward and backward buttons, this computer mice streamlines your workflow, making it easy to navigate through web pages and files with a simple click. 📌Side button does not work on Mac.
  • 【Visible Indicator Light】 The pc mouse features a visual indicator for DPI levels and low battery alerts. The red light flashes once for 800 DPI, twice for 1200 DPI, and three times for 1600 DPI. When the battery level is below 10%, the light flashes red until the mouse is completely out of power.
  • 【Click to Wake】With smart sleep mode, it saves power by standby after 10 inactive minutes, just 2-3 clicks to wake. This efficient design delivers 3x longer battery life than motion-wake mice. Engineered for durability, its buttons and scroll wheel are tested for 10 million clicks, ensuring long-term reliability and consistent performance.

Should I use JavaScript to add a custom scrollbar?

Usually no. Native scrolling handles keyboard, touch, focus and platform conventions more reliably. Fix the scroll container and overflow rules first; add a custom control only when its interaction and accessibility are fully equivalent.

Frequently Asked Questions

Can CSS force a scrollbar to remain visible on every device?

No. overflow: scroll requests a scrollbar, but overlay and auto-hide policies are controlled by the browser and operating system. You can reserve layout space with scrollbar-gutter: stable, not guarantee a permanently painted track.

Why does changing the browser zoom alter the scrollbar?

Zoom changes the effective viewport and the amount of content that fits in a fixed or maximum-height box. Recheck the container’s computed dimensions and its scrollHeight at the zoom level where the issue occurs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Should I use JavaScript to add a custom scrollbar?

Usually no. Native scrolling handles keyboard, touch, focus and platform conventions more reliably. Fix the scroll container and overflow rules first; add a custom control only when its interaction and accessibility are equivalent.

Quick Recap

SaleBestseller No. 1
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
Product carbon footprint: 3.97 kg CO2e; Contoured shape: Gives you more comfort and control
$14.90
SaleBestseller No. 3
Bestseller No. 4
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
Computer mouse for easily navigating a computer interface; click, scroll, and more; 3 buttons offer effortless fingertip control
$9.70

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.