# Widen display in IJulia/Jupyter notebook

**URL:** <https://discourse.julialang.org/t/widen-display-in-ijulia-jupyter-notebook/12470>\
**Category:** Tooling\
**Tags:** question\
**Created:** [July 18, 2018, 4:36pm UTC](https://discourse.julialang.org/t/widen-display-in-ijulia-jupyter-notebook/12470 "2018-07-18T16:36:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin.squire](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevin.squire/32/62_2.png) [@kevin.squire](https://discourse.julialang.org/u/kevin.squire)\
**Post date:** [July 18, 2018, 4:36pm UTC](https://discourse.julialang.org/t/widen-display-in-ijulia-jupyter-notebook/12470/1 "2018-07-18T16:36:28Z")

</div>

Hi all,

When using Python in a Jupyter notebook, it’s possible to widen the display using

```python
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))

```

(from [python - How do I increase the cell width of the Jupyter/ipython notebook in my browser? - Stack Overflow](https://stackoverflow.com/a/34058270/880987))

Is there a similar trick to accomplish the same thing using `IJulia/Jupyter`?

(The same StackOverflow post above has a method to change it for all notebooks, but I prefer doing this on a per-notebook basis.)

Thanks,  
Kevin

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [July 18, 2018, 4:41pm UTC](https://discourse.julialang.org/t/widen-display-in-ijulia-jupyter-notebook/12470/2 "2018-07-18T16:41:54Z")

</div>

You can render HTML content in Jupyter with `display` and the `"text/html"` MIME type:

```julia
display("text/html", "<script>alert('hello')</script>")

```

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [July 18, 2018, 6:57pm UTC](https://discourse.julialang.org/t/widen-display-in-ijulia-jupyter-notebook/12470/3 "2018-07-18T18:57:04Z")

</div>

[Decrease margins of IJulia in Jupyter notebook?](https://discourse.julialang.org/t/decrease-margins-of-ijulia-in-jupyter-notebook/6912) useful?

---

<div class="post-metadata">

**Author:** ![kevin.squire](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevin.squire/32/62_2.png) [@kevin.squire](https://discourse.julialang.org/u/kevin.squire)\
**Post date:** [July 18, 2018, 10:48pm UTC](https://discourse.julialang.org/t/widen-display-in-ijulia-jupyter-notebook/12470/4 "2018-07-18T22:48:52Z")

</div>

Thanks, @rdeits, that worked perfectly with the above code!

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

```

Cheers,  
Kevin

---

<div class="post-metadata">

**Author:** ![kevin.squire](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevin.squire/32/62_2.png) [@kevin.squire](https://discourse.julialang.org/u/kevin.squire)\
**Post date:** [July 18, 2018, 10:49pm UTC](https://discourse.julialang.org/t/widen-display-in-ijulia-jupyter-notebook/12470/5 "2018-07-18T22:49:38Z")

</div>

And @cormullion, sorry, I searched and didn’t find that answer. Whoops! Thank you!
