![]() |
#1 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: May 2013
Device: all
|
![]()
I am not sure where the @page css is supposed to be placed. If I have the following to set my page margins:
@page { margin-top: 6pt; margin-right: 6pt; margin-left: 6pt; } Does this go in my Style0001.css file or does it have to be placed in every html file I want it applied to? If it has to go in each and every file what code would it be placed between? I currently have it in my style sheet but the Sigil book view is not affected when I make changes. All the other rules in my style sheet are working, so I was wondering why not this one? Last edited by EbookNoob; 05-08-2013 at 05:26 PM. |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,130
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If you do use @page, older versions of ADE that have the page number in the right margin will have the page number shifted to the left. Because of this, it's not a good idea to use @page to set margins.
Oh and so others can see, this thread does not belong in the Sigil forum as it has nothing at all to do with Sigil. It belongs in the ePub forum. Last edited by JSWolf; 05-08-2013 at 05:09 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,903
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I personally put it in the stylesheet. The @page is a bit peculiar and personally I do not use it for left and right margins, only for top and bottom. If you do use it for left and right margins, you can have the effect that JSWolf describes. Left and right margin (should you want to set it), can be set in the HTML or BODY tag.
|
![]() |
![]() |
![]() |
#5 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,312
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I was under the impression that it is better to have the @page in it's own stylesheet. Some of the older (ADE?) devices ignore the entire style sheet if it has @page, so you keep it separate from all your other css...
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,903
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Calibre fairly recently, moved Page stuff to its own stylesheet
Probably for the reasons given |
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I have an old PRS-300 (a fairly old device and ADE based) and it does not ignore the @page.
|
![]() |
![]() |
![]() |
#8 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,903
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
My PEz is 2009, It does not ignore it either.
|
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: May 2013
Device: all
|
Can anyone tell me how to delete posts. The faq section says to hit the edit button but doesn't explain in detail what to do next. Sorry if I'm missing something obvious.
Last edited by EbookNoob; 05-09-2013 at 03:05 PM. |
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: May 2013
Device: all
|
Thanks everyone! One more quick question? Should I set a bottom margin? It seems to me that these readers have automatic top and bottom margins built in because on the nook the book title is displayed along the top of the page and the page number is displayed along the bottom. With margins set to 0 on top and bottom the text still never overlaps into these areas. The only reason I set a top margin was due to the fact that the book title along the top of the screen looks like part of the body text if there isn't a bigger margin then what is already there. The text near the bottom of the page never even really gets close to the built in displayed page numbers on the bottom of the screen.
|
![]() |
![]() |
![]() |
#11 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
It is actually up to personal taste. I have a small margin of 5pt to have some separation. I find it easier to read. YMMV
|
![]() |
![]() |
![]() |
#12 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,903
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
You could edit and add SOLVED to the END if that strike your fancy. Mods can Move or remove duplicate posts. The forum Mod list is at the bottom of the main forum page. Just slide one of them a PM ![]() |
|
![]() |
![]() |
![]() |
#13 |
Obsessively Dedicated...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,202
Karma: 34984330
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
I wasn't aware of this, is there a source somewhere for more info?
|
![]() |
![]() |
![]() |
#14 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,312
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I get most of my info from MR, so it was here somewhere. I wasn't sure if it was ADE based or not...Also it could have been something I read when I was in the alternate universe...
Let me see if I can search it out. |
![]() |
![]() |
![]() |
Tags |
@page, css, margins |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding a css page to an e pub | holdit | Sigil | 7 | 04-04-2013 03:26 PM |
css-style access every odd/even page | testuser | Library Management | 1 | 12-28-2012 03:30 AM |
CSS animation executes before page | KLK | ePub | 2 | 12-13-2012 04:28 AM |
ePub margins : @page vs stylesheet.css | Agama | Calibre | 1 | 08-16-2010 04:37 PM |