# trame: inject custom css

**URL:** https://discourse.paraview.org/t/trame-inject-custom-css/11181
**Category:** Web Support
**Created:** [January 17, 2023, 3:27am UTC](https://discourse.paraview.org/t/trame-inject-custom-css/11181 "2023-01-17T03:27:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [January 17, 2023, 3:27am UTC](https://discourse.paraview.org/t/trame-inject-custom-css/11181/1 "2023-01-17T03:27:22Z")

</div>

In a trame + paraview based application, all I want to do is inject this following css. How can I do that?

```css
html {
  overflow-y: hidden
}

```

What’s happening is I am getting this y-scrollbar (highlighted below) and I want to get rid of it. Just adding this little snippet above using the browser’s developer tools panel does the trick.

 ![image](https://discourse.paraview.org/uploads/default/original/2X/2/23eb6cdec714f16c2fa702e7f5bf36bf1217e2a9.png)

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [January 17, 2023, 3:53pm UTC](https://discourse.paraview.org/t/trame-inject-custom-css/11181/2 "2023-01-17T15:53:28Z")

</div>

You can use the `trame.widgets.client.Style()` to inject any CSS. [That example](https://github.com/Kitware/trame/blob/master/examples/validation/core/28_css.py) perform dynamic update. But for your usecase, you can simply do the following

```python
from trame.widgets import client
# [...]

with xxx as layout:
   client.Style("html { overflow-y: hidden; }")
   # [...]

```

HTH,

Seb

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [January 17, 2023, 3:59pm UTC](https://discourse.paraview.org/t/trame-inject-custom-css/11181/3 "2023-01-17T15:59:54Z")

</div>

Sweet. `client.Style(...)` did the trick. Thanks!
