Mkdocs, How to maximize content space width?
03/06/2025
@ Saigon
etc
This post is all about maximize content space for Mkdocs sites. The main solution is to override css and set max-width: 100%;
1. Create docs/style.css
.md-grid {
margin-left: auto;
margin-right: auto;
max-width: 100%;
}
2. Modify mkdocs.yml
to use docs/style.css
extra_css:
- style.css
![[1] Before maximize content space/width](/image/posts/2025-06-03-Mkdocs-How-to-maximize-content-space-width/1.jpg)
![[2] After maximize content space/width](/image/posts/2025-06-03-Mkdocs-How-to-maximize-content-space-width/2.jpg)