0

From this answer, I've been able to adjust the widths of code cell and markdown cell independently

from IPython.core.display import display, HTML
display(HTML("<style>.jp-Cell.jp-CodeCell { width: 70% !important;  margin: 0 auto; }</style>"))
display(HTML("<style>.jp-Cell.jp-MarkdownCell { width: 90% !important;  margin: 0 auto; }</style>"))

Then I also want to keep the output cell intact so that I can display big plot with

display(HTML("<style>.jp-OutputArea-output { width: 100% !important;  margin: 0 auto; }</style>"))

Unfortunately, it does not work

enter image description here

Could you please elaborate on how to adjust the width of the output cell?

Update: I also tried

display(HTML("<style>.jp-Cell.jp-CodeCell.jp-Cell-inputWrapper { width: 70% !important;  margin: 0 auto; }</style>"))
display(HTML("<style>.jp-Cell.jp-CodeCell.jp-Cell-outputWrapper { width: 100% !important;  margin: 0 auto; }</style>"))

, but they did not work.

Akira
  • 2,594
  • 3
  • 20
  • 45

1 Answers1

0

It seems that I found the solution

from IPython.core.display import display, HTML
display(HTML("<style>.jp-CodeCell .jp-Cell-inputWrapper { width: 80% !important;  margin: 0 auto; }</style>"))
display(HTML("<style>.jp-MarkdownCell .jp-Cell-inputWrapper { width: 90% !important;  margin: 0 auto; }</style>"))
display(HTML("<style>.jp-Cell-outputWrapper { width: 100% !important;  margin: 0 auto; }</style>"))
Akira
  • 2,594
  • 3
  • 20
  • 45