1

From this great answer, I'm able to adjust the width of cells in JupyterLab.

enter image description here

The result would be perfect if we can center the cells. Could you please elaborate on how to do do?

krassowski
  • 13,598
  • 4
  • 60
  • 92
Akira
  • 2,594
  • 3
  • 20
  • 45

1 Answers1

1

Adding margin: 0 auto works as for JupyterLab 3.0:

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

But I believe that questions like that might be counter productive as we already have the CSS positioning perfectly explained in: How to horizontally center an element.

krassowski
  • 13,598
  • 4
  • 60
  • 92