Adjusting position of md-clipboard md-icon (code block copy to clipboard button) #7806
-
|
I wanted my mkdocs site to be full width, so I added this to extra.css: .md-grid {
max-width: 100%;
/* or 100%, if you want to stretch to full-width */
}As a result, code blocks, among other things, are also full width. I would much rather have codeblocks, admonitions, etc. keep their default widths. Anyway, I found the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Could you check with inspector/DevTools what See if that works :) I also recommend taking a look at the css position property |
Beta Was this translation helpful? Give feedback.
-
|
Hello @rmscode, .md-grid {
max-width: initial;
}
.md-code__content {
max-width: 50%;
}There is a .highlight {
max-width: 50%;
} |
Beta Was this translation helpful? Give feedback.


Hello @rmscode,
the
.md-code__contentdoesn't include the buttons. At least looking at the example here:There is a
preelement which wraps the output and there is also thedivwrapper with the.highlightclass.So instead of targetting
.md-code__contenttarget thehighlightclass.