![]() |
How does one set the margin size?
I have tweaked some novels with Sigil since it was released, but now I want to add a nice margin to a lot of works where there is none.
I purchased an ePub from Shortcovers.com, and was pleased to see the margins didn't interfere with the page numbering! This would be a great addition to make my eBooks more aesthetically pleasing. I imagine it is done with CSS (which I know nothing about). Is there a nice WYSIWYG way doing this currently? Will a way be added? Thanks for the help, Sigil is shaping up quickly. EDIT: I am referring to left/right margins as well as top/bottom. |
Quote:
|
Great, thanks!
Now, is the coding way easy enough for someone to explain in this thread, or should I just wait for the WYSIWYG method? I do know some coding, just basic HTML and Objective-C, so I should be able to catch on pretty quickly. Thanks again. |
Quote:
<body style="margin:5px"> to give five pixels of margin all around the page. If you want more or less, just change the figure. If you want uneven margins, use <body style="margin:5px 4px 0px 4px"> where the order is top, right, bottom, left. |
@page selector
Quote:
To specify margins of the pages on the screen, I use the @page selector, mostly with @page { margin: 5pt; } for display on the CyBook Opus. |
You might be right - I don't know.
Having checked, indeed, you are right - my suggestion only affects the first and last pages of a flow for top & bottom margins. adding your suggestion to the CSS code works @page { margin: 5px; } is the right way to do it. Thanks! Quote:
|
Thank you again for this - it's sorted out one puzzle for me to do with the cover page. Now I specify
body { margin:0; } @page { margin: 4pt; } in the my global CSS file, and in the cover page XHTML file I add in an override just after the link to the standard CSS like this: <link rel="stylesheet" href="../styles/style001.css" type="text/css" /> <style type="text/css"> body {margin:0; padding: 0; border-width: 0; } @page {margin: 0; padding: 0; border-width: 0; } </style> And now my cover stretches to fill the screen as much as possible. Setting padding and border-width to 0 as well as the margin might be overkill, but it does no harm as far as I know. Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
@page :first { *your styles here* } See http://www.w3.org/TR/CSS2/page.html#page-selectors: |
Quote:
|
Quote:
http://www.idpf.org/2007/ops/OPS_2.0_final_spec.html: "not all CSS 2 properties are included" but the @page :first etc. pseudo classes are supported, see http://www.idpf.org/2007/ops/OPS_2.0...tml#Section3.3 |
I did see that and gave it a go, but I couldn't get it to work.
If it did work, I think it would apply to the first page of each flow in the document, not the first page in the ePub - so good for doing special things at chapter starts, not so good for the cover image :-) Quote:
|
| All times are GMT -4. The time now is 06:30 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.