vscode-markdown-pdf
vscode-markdown-pdf copied to clipboard
CSS float seems to be ignored
I use embedded HTML and CSS to create a layout of my elements. Vscode's preview renders it fine, and when exported to HTML the markdown renders fine in a browser. However, the PDF export does not render correctly.
Here is my markdown
<!-- Main div for the layout -->
<div style="border-top:solid">
<!-- Div for left side -->
<div style="float:left;">
#### This only exists
### For testing
</div>
<!-- Div for right side -->
<div>
<div style="float:right;padding:5pt">
### More
### Testing
</div>
<!-- Div for center line-->
<div style="float:right;height:100vh;border-left:solid;padding:5pt"></div>
</div>
</div>
Which should look like this screenshot:
But it ends up looking like this instead:
It looks the same as if all of float css attributes were removed.
Workaround: export as HTML, load the file into a browser, and use the print function to create a PDF file. I believe most browsers should have a print function, but for Firefox it's in the hamburger menu on the right.