Skip to content

Allow content width to grow without limiting it. #6404

Answered by kamilkrzyskow
griznog asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,
to stretch the content area fully and dynamically, in your extra css you can set either one:

.md-main__inner.md-grid {
    max-width: initial;
}

or

.md-grid {
    max-width: initial;
}

The first one targets the inner content grid specifically, and the second targets all of them (footer and header have separate grids).
You can use both but, keep in mind that in CSS specificity matters, so .md-main__inner.md-grid will override a plain .md-grid.

If you don't want to use initial use rem values, I believe that max-width: 61rem; is the default for .md-grid.

https://squidfunk.github.io/mkdocs-material/customization/#additional-css

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@griznog
Comment options

Answer selected by griznog
Comment options

You must be logged in to vote
5 replies
@squidfunk
Comment options

@pitosalas
Comment options

@squidfunk
Comment options

@squidfunk
Comment options

@pitosalas
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants