How to shorten the content of area of one page? #6152
Answered
by
alexvoss
mendax1234
asked this question in
Q&A
-
I only want to shorten the content of the area of one page, what should l do? After reading the related topic in mkdocs material, l find that the provided method will applied to all of the pages on the site. Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
alexvoss
Oct 7, 2023
Replies: 1 comment 3 replies
-
Can you point me to the part of the documentation you were looking at, please? I am not sure I understand your question. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One approach I can think of is to produce a theme extension and then setting the page template for the pages where you want a different width. The template should then define a CSS class you can match in your
extra.css
to produce the desired width only for those pages that need it.It may be more straightforward to do this with just CSS if there is something you can match that is already unique to the pages were you want to have a different width. If I understand CSS correctly, it would need to be an element or an attribute. It is not possible to match on content (such as the text in the top-level heading).
Think about whether there will be other things that may need to be adjusted for th…