Skip to content

Is it possible to restrict the width of an admonition? #7885

Discussion options

You must be logged in to vote

Hello @MaximilianKohler,
the answer provided by ChatGPT with the :class: is a hallucination probably based on the Sphnix docs, however the admonitions in MkDocs are generated using the extension from Python Markdown:

From the docs it says:

You can also provide additional CSS class names separated by spaces. The first class should be the “type.” For example:

!!! danger highlight blink "Don't try this at home"
...

So in your case it wold be !!! note custom-width "Custom Admonition"
The CSS looks fine.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@kamilkrzyskow
Comment options

@MaximilianKohler
Comment options

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