# Don't style the scrollbar

**URL:** <https://forum.radzen.com/t/dont-style-the-scrollbar/5361>\
**Category:** Radzen.Blazor Components\
**Created:** [October 21, 2020, 8:23pm UTC](https://forum.radzen.com/t/dont-style-the-scrollbar/5361 "2020-10-21T20:23:36Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![timheuer](https://forum.radzen.com/user_avatar/forum.radzen.com/timheuer/32/1726_2.png) [@timheuer](https://forum.radzen.com/u/timheuer)\
**Post date:** [October 21, 2020, 8:23pm UTC](https://forum.radzen.com/t/dont-style-the-scrollbar/5361/1 "2020-10-21T20:23:36Z")

</div>

I'm using Radzen components for Blazor but it has a negative affect of styling the scrollbar. I don't want that and everything I am trying in CSS is failing to clear the ::-webkit-scrollbar-\* settings. I don't want the default that is coming from default.css coming from the Radzen component.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [October 22, 2020, 3:30am UTC](https://forum.radzen.com/t/dont-style-the-scrollbar/5361/2 "2020-10-22T03:30:53Z")

</div>

We will introduce a new CSS class that when applied to the `body` will prevent scrollbar styling.

`<body class="rz-default-scrollbars">`

I will post here when Radzen.Blazor has been updated.

For an immediate workaround you would need to use a local copy of the theme CSS file instead of the embedded one and delete all `::--webkit-scrollbar` stuff.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [October 22, 2020, 1:57pm UTC](https://forum.radzen.com/t/dont-style-the-scrollbar/5361/3 "2020-10-22T13:57:16Z")

</div>

@timheuer the current version of Radzen.Blazor should contain the aforementioned CSS class. Add it to your `<body>` element to prevent the scrollbar styling.

---

<div class="post-metadata">

**Author:** ![ns6000](https://forum.radzen.com/user_avatar/forum.radzen.com/ns6000/32/12176_2.png) [@ns6000](https://forum.radzen.com/u/ns6000)\
**Post date:** [December 3, 2025, 8:39am UTC](https://forum.radzen.com/t/dont-style-the-scrollbar/5361/4 "2025-12-03T08:39:25Z")

</div>

Hey, I’ve got Radzen.Blazor Components v6.6.4 and i can’t update right now, i believe, this version is much newer than 2020… And yet, there is no mentioned class in inspected `default-base.css`. I looked into Radzen sources in Github and yes it’s there in:

[https://github.com/radzenhq/radzen-blazor/blob/master/Radzen.Blazor/themes/components/blazor/\_scrollbar.scss](https://github.com/radzenhq/radzen-blazor/blob/master/Radzen.Blazor/themes/components/blazor/_scrollbar.scss)

But in my css, the scrollbar styling is always set…

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [December 3, 2025, 8:51am UTC](https://forum.radzen.com/t/dont-style-the-scrollbar/5361/5 "2025-12-03T08:51:11Z")

</div>

The class is now called `rz-default-scrollbars`. Also if you use the -base CSS files e.g. `material-base.css` instead of `material.css` you would not get scrollbar styling at all. They exist mostly for backwards compatibility.

**UPDATE:** I stand corrected - those statements are no longer true check @yordanov 's reply below.

---

<div class="post-metadata">

**Author:** ![ns6000](https://forum.radzen.com/user_avatar/forum.radzen.com/ns6000/32/12176_2.png) [@ns6000](https://forum.radzen.com/u/ns6000)\
**Post date:** [December 3, 2025, 9:13am UTC](https://forum.radzen.com/t/dont-style-the-scrollbar/5361/6 "2025-12-03T09:13:59Z")

</div>

I’m using:

```auto
<HeadContent>
<RadzenTheme Theme="@appState.Theme" Wcag="@appState.WCAG" />
</HeadContent>

```

where:

Theme = default

WCAG = true

and i’m getting in head lement in generated HTML:

```auto
<link rel="stylesheet" href="_content/Radzen.Blazor/css/default-base.css?v=6.6.4.0">

```

And there is no class `rz-default-scrollbars` in there...

---

<div class="post-metadata">

**Author:** ![ns6000](https://forum.radzen.com/user_avatar/forum.radzen.com/ns6000/32/12176_2.png) [@ns6000](https://forum.radzen.com/u/ns6000)\
**Post date:** [December 3, 2025, 9:27am UTC](https://forum.radzen.com/t/dont-style-the-scrollbar/5361/8 "2025-12-03T09:27:11Z")

</div>

Yes, with no way of removing them other than:

```auto
.rz-layout::-webkit-scrollbar,
.rz-layout ::-webkit-scrollbar,
.rz-scrollbars::-webkit-scrollbar,
.rz-scrollbars ::-webkit-scrollbar {
	all: unset !important;
}

.rz-layout::-webkit-scrollbar-thumb,
.rz-layout ::-webkit-scrollbar-thumb,
.rz-scrollbars::-webkit-scrollbar-thumb,
.rz-scrollbars ::-webkit-scrollbar-thumb {
	all: unset !important;
}

.rz-layout::-webkit-scrollbar-corner,
.rz-layout ::-webkit-scrollbar-corner,
.rz-scrollbars::-webkit-scrollbar-corner,
.rz-scrollbars ::-webkit-scrollbar-corner {
	all: unset !important;
}

```

but that just renders them invisible...

---

<div class="post-metadata">

**Author:** ![ns6000](https://forum.radzen.com/user_avatar/forum.radzen.com/ns6000/32/12176_2.png) [@ns6000](https://forum.radzen.com/u/ns6000)\
**Post date:** [December 3, 2025, 9:43am UTC](https://forum.radzen.com/t/dont-style-the-scrollbar/5361/9 "2025-12-03T09:43:16Z")

</div>

I may be asking wrong question actually, I'm using `<RadzenTable>` in overflow container and i'm getting this scrollbars:

 ![image](https://forum.radzen.com/uploads/default/original/3X/8/7/873f7e18b41cffeb88b7e04e1d47f2fc0f22e8fb.png)

which is fine on desktop, but on mobile browsers, they are rendered over the text on the right in the last column. So basically i'm wondering what to do about that...

---

<div class="post-metadata">

**Author:** ![yordanov](https://forum.radzen.com/user_avatar/forum.radzen.com/yordanov/32/8020_2.png) [@yordanov](https://forum.radzen.com/u/yordanov)\
**Post date:** [December 3, 2025, 10:02am UTC](https://forum.radzen.com/t/dont-style-the-scrollbar/5361/10 "2025-12-03T10:02:07Z")

</div>

Hi @ns6000,

Is `<RadzenLayout>` present? If you’re not using `<RadzenLayout>` and the `<body>` element doesn’t have `class="rz-scrollbars"`, the scrollbars shouldn’t be styled.

---

<div class="post-metadata">

**Author:** ![ns6000](https://forum.radzen.com/user_avatar/forum.radzen.com/ns6000/32/12176_2.png) [@ns6000](https://forum.radzen.com/u/ns6000)\
**Post date:** [December 3, 2025, 10:04am UTC](https://forum.radzen.com/t/dont-style-the-scrollbar/5361/11 "2025-12-03T10:04:49Z")

</div>

Yes I am as my top element in `<AuthorizeView>`

---

<div class="post-metadata">

**Author:** ![yordanov](https://forum.radzen.com/user_avatar/forum.radzen.com/yordanov/32/8020_2.png) [@yordanov](https://forum.radzen.com/u/yordanov)\
**Post date:** [December 3, 2025, 10:29am UTC](https://forum.radzen.com/t/dont-style-the-scrollbar/5361/12 "2025-12-03T10:29:20Z")

</div>

We will update `*-base.css` themes to include the `.rz-default-scrollbars` class. If updating to the newer version isn’t an option, your only practical workaround is to remove the `<RadzenLayout>`.

---

<div class="post-metadata">

**Author:** ![ns6000](https://forum.radzen.com/user_avatar/forum.radzen.com/ns6000/32/12176_2.png) [@ns6000](https://forum.radzen.com/u/ns6000)\
**Post date:** [December 3, 2025, 10:47am UTC](https://forum.radzen.com/t/dont-style-the-scrollbar/5361/13 "2025-12-03T10:47:40Z")

</div>

That's unfortuantelly not an option, that indeed resets the scrollbars but it kinda fucks up everything else 😕

Thanks anyway 🙂

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [December 3, 2025, 10:48am UTC](https://forum.radzen.com/t/dont-style-the-scrollbar/5361/14 "2025-12-03T10:48:26Z")

</div>

There is one additional workaround - to build a custom theme from source.

1. Clone the radzen-blazor github repository
2. Checkout the tag that corresponds to the version that you use.
3. Open \_scrollbar.scss and delete everything.
4. Build Radzen.Blazor.csproj - the theme CSS files should be in the wwwroot subdirectory.
5. Copy the desired theme CSS file to your own app's wwwroot folder and include it via `<link />`. Remove RadzenTheme.
