CSS for page margins, or some other easy way to get a 1" margin

Derick's Avatar


03 Sep, 2013 05:18 AM

This may be more a CSS question than a Marked Q.

I love the ability to quickly format markdown with Marked but I occasionally need to print documents with more control over the appearance than seems to be available in Marked. From discussions it's clear Marked (& Webkit) doesn't support @page very robustly. Is there any other way to simply get a PDF with a 1" margin?

It seems there is a market for a Markdown -> print workflow that allows some customization but which doesn't require the commitment that Markdown -> TeX -> print/PDF requires. Any takers?

  1. Support Staff 1 Posted by Brett on 03 Sep, 2013 02:00 PM

    Brett's Avatar

    Unfortunately it's neither a CSS question or a Marked question, really. You _may_ be able to get the results you want by setting a max-width on the #wrapper element, but margins seem to be lost in the print process. I have remedied this for what is now "Marked 2," and it provides settings for print margins on left/right and top/bottom, as well as the full page size settings you'd expect. I can't add this to 1.4 without incurring the wrath of sandboxing on it, but a real solution will be available soon.


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac