How to increase the cell width of the Jupyter Notebook in browser ?
This tutorial guides you on how to increase the cell width of the Jupyter Notebook in browser. A Jupyter Notebook cell is called as code cell which will allow you to edit and write a new code. When the code cell that contains code is run, it will be sent to the IPython kernel installed in the notebook environment and executed.
Increase the cell width of the Jupyter Notebook in browser
Let’s say if you have a higher resolution screen and you see extra space around as shown in the screenshot below. Therefore, you would like to expand he cell width to make use of the extra space.
Note, the theme I am using for notebook interface is the default one with default settings. If you wanted to change only the width of the notebook cell, you just need the enter the following code in the cell to resize the cell width.
from IPython.core.display import display, HTML display(HTML("<style>.container { width:100% !important; }</style>"))
For instance, after entering the above code in the cell, just hit “Run“. Finally, you could see the you are able to increase the cell width of the Jupyter Notebook in browser.
Increase the cell width of notebook using custom css
Alternative way to increase the cell width is to create/ edit css file as explained below.
Go the following location
C:\Users\<profile_account>\.jupyter\custom
If you find custom.css in that location then edit to add the following content or create a file called custom.css with the content below.
custom.css
.container { width:100% !important; }
Note, this file contains any manual css for the notebook interface page that needs to override the global styles. This is only required when different pages style the same element differently. This is just a hack to deal with your current CSS style. And no new styling should be added to this file.
Finally, reload the page of jupyter notebook interface. Note, this will affect all the notebooks.
That’s it. Hope it helped 🙂
You’ll also like:
- Add python3 kernel to jupyter IPython notebook ?
- Reset jupyter notebook theme to default theme
- How to change the default theme in Jupyter Notebook ?
- Change the Jupyter Notebook startup folder in Windows & Mac
- To run Jupyter Notebook on Windows from command line
- Run a Jupyter Notebook .ipynb file from terminal or cmd prompt
- Amazon Linux AMI : apt-get command not found
- Install Python 3 on Windows 10 machine
- Linux: sudo: apt-get: command not found
- How to Start Stop Restart MariaDB on Linux OS ?
- Putty Fatal Error No supported authentication methods available
- How to find which users belongs to a specific group in linux
- Give write permissions for specific user or group for specific folder in linux
- How to unzip a zip file from Terminal (Google Cloud Shell)
- Build a Docker Image with a Dockerfile and Cloud Build in GCP?
- Is it possible to change Google Cloud Platform Project ID ?
- Create non-root SSH user account and provide access to specific folders
- How to install OpenJDK 11 in Ubuntu Machine ?
References