Lavy
Lavy

Reputation: 11

MkDocs-with-pdf admonition icons on wrong position in pdf

I would like to write a manual that is output as both an html and a pdf file. I am working with MkDocs material and the plugin mkdocs-with-pdf. This works very well for everything I have in mind, but the icons of the admonitions in the pdf file are in the wrong place, in the html file everything is okey.

in pdf in html

I tried to force the icons to the left side with an extra.css, but that didn't work.

extra.css:

.admonition-icon {
    float: left; 
    margin-right: 3px; 
}

.md file:

<div class="admonition warning">
<p class="admonition-title">Caution</p>
<p>Insert text here</p>
</div>

Can I possibly do this in my .md file, or do you have any other ideas? I may have written my extra.css incorrectly.

I hope for help :)

Upvotes: 1

Views: 145

Answers (1)

For anybody still searching, I fixed it with below extra css. I found the solution with the help of the inspect tools in the browser.

.md-typeset .admonition-title::before {
  left: 0.5rem;
  top: 0.7rem;
}

Upvotes: 0

Related Questions