# Widen Jupyter Notebook

**URL:** <https://discourse.julialang.org/t/widen-jupyter-notebook/117811>\
**Category:** New to Julia\
**Tags:** question, ijulia, notebooks\
**Created:** [August 4, 2024, 3:49pm UTC](https://discourse.julialang.org/t/widen-jupyter-notebook/117811 "2024-08-04T15:49:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Finseth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/john_finseth/32/210036_2.png) [@John\_Finseth](https://discourse.julialang.org/u/John_Finseth)\
**Post date:** [August 4, 2024, 3:49pm UTC](https://discourse.julialang.org/t/widen-jupyter-notebook/117811/1 "2024-08-04T15:49:21Z")

</div>

Hello,  
How can I widen cells in Jupyter notebook? I tried the fix from [this](https://discourse.julialang.org/t/widen-display-in-ijulia-jupyter-notebook/12470) post, but it doesn’t change anything about my notebook.

```julia
using IJulia
display("text/html", "<style>.container { width:100% !important; }</style>")

```

I also tried this from ChatGPT

```julia
using Markdown
Markdown.html("<style>.container { width:100% !important; }</style>")

```

Any idea why this has no effect on my notebook and other ways to widen the cells? Thanks.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 4, 2024, 7:57pm UTC](https://discourse.julialang.org/t/widen-jupyter-notebook/117811/2 "2024-08-04T19:57:24Z")

</div>

> [@John\_Finseth](#):
>
> ```julia
> display("text/html", "<style>.container { width:100% !important; }</style>")
> 
> ```

Works for me (you have to make the window wider first, since `width:100%` is relative to the window width).

---

<div class="post-metadata">

**Author:** ![John\_Finseth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/john_finseth/32/210036_2.png) [@John\_Finseth](https://discourse.julialang.org/u/John_Finseth)\
**Post date:** [August 5, 2024, 7:12am UTC](https://discourse.julialang.org/t/widen-jupyter-notebook/117811/3 "2024-08-05T07:12:33Z")

</div>

What’s the window width here? The width of my browser window where I’m running the notebook? It’s full screen. Is there something I have to do in Jupyter settings?

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 5, 2024, 12:31pm UTC](https://discourse.julialang.org/t/widen-jupyter-notebook/117811/4 "2024-08-05T12:31:25Z")

</div>

> [@John\_Finseth](#):
>
> What’s the window width here?

See the following example, in which the input cell starts narrower than the browser window and then expands to match the window width:

---

<div class="post-metadata">

**Author:** ![John\_Gibson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/john_gibson/32/5321_2.png) [@John\_Gibson](https://discourse.julialang.org/u/John_Gibson)\
**Post date:** [August 5, 2024, 4:10pm UTC](https://discourse.julialang.org/t/widen-jupyter-notebook/117811/5 "2024-08-05T16:10:18Z")

</div>

> [@John\_Finseth](#):
>
> ```julia
> using IJulia
> display("text/html", "<style>.container { width:100% !important; }</style>")
> 
> ```

Thanks for this! It’s been much needed.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 5, 2024, 4:54pm UTC](https://discourse.julialang.org/t/widen-jupyter-notebook/117811/6 "2024-08-05T16:54:59Z")

</div>

> [@John\_Gibson](#):
>
> Thanks for this! It’s been much needed.

Note that (a) it was [posted 6 years ago](https://discourse.julialang.org/t/widen-display-in-ijulia-jupyter-notebook/12470/4) (and a similar solution [7 years ago](https://discourse.julialang.org/t/decrease-margins-of-ijulia-in-jupyter-notebook/6912/2)) and (b) the `using IJulia` is not needed.

---

<div class="post-metadata">

**Author:** ![John\_Finseth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/john_finseth/32/210036_2.png) [@John\_Finseth](https://discourse.julialang.org/u/John_Finseth)\
**Post date:** [August 5, 2024, 5:17pm UTC](https://discourse.julialang.org/t/widen-jupyter-notebook/117811/7 "2024-08-05T17:17:24Z")

</div>

![Screenshot 2024-08-05 181641](https://global.discourse-cdn.com/julialang/original/3X/0/5/057bcebdc666d2e2082f77d2d3c8ea76f5151c47.png)

I’ve tried this, and as you can see my window doesn’t expand. Am I entering something wrong?

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 5, 2024, 6:30pm UTC](https://discourse.julialang.org/t/widen-jupyter-notebook/117811/8 "2024-08-05T18:30:17Z")

</div>

> [@John\_Finseth](#):
>
> I’ve tried this, and as you can see my window doesn’t expand. Am I entering something wrong?

Looks like it [changed in Jupyter version 7](https://stackoverflow.com/a/76778615/3662120). The new command is:

```julia
display("text/html", "<style>:root { --jp-notebook-max-width: 100% !important; }</style>")

```
