![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,071
Karma: 1960
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
css override code for margins?
Hi,
I'm not sure what code to use in the override box to get the page to use my margins instead of the settings in Calibre? I'm trying to get the top and bottom margin down to 0. I'd appreciate any and all help. Thanks |
![]() |
![]() |
![]() |
#2 |
Sir Penguin of Edinburgh
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,359
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
It should look something like the following (change the numbers to suit your preferences):
body { margin-left:0; margin-right:0; margin-top:0; margin_bottom:0; } |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,071
Karma: 1960
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
|
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,071
Karma: 1960
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
I tried that code but it didn't seem to affect the bottom and top margins. I tried p {margin-left:0; margin-right:0; margin-top:0; margin_bottom:0;} and that seemed to work better. Not sure if it's proper coding or not but at least I no longer have 1 inch margins at the bottom of my files. |
|
![]() |
![]() |
![]() |
#5 |
Sir Penguin of Edinburgh
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,359
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
Oops. You caught a typo. I wrote margin_bottom; it should read margin-bottom.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,071
Karma: 1960
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
|
![]() |
![]() |
![]() |
#7 |
my parent's oops...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 463
Karma: 1477570
Join Date: Feb 2009
Device: Vx->Handera->Clie-> Axim->505->650->KPW/Aura ->iOS/L2
|
I use:
Code:
p { margin-top: 0pt; margin-bottom:0pt;padding:0pt; text-indent:20pt } |
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,071
Karma: 1960
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
is the body selector just different from other selectors? Or is there more going on? And is body {margin-left:0; margin-right:0; margin-top:0; margin_bottom.0;} more correct than p {margin-top: 0pt; margin-bottom: 0pt; padding: 0pt; text-indent: 15pt;} Last edited by Amalthia; 08-11-2009 at 02:59 PM. |
|
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,071
Karma: 1960
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
|
![]() |
![]() |
![]() |
#10 | |
Sir Penguin of Edinburgh
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,359
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
Quote:
|
|
![]() |
![]() |
![]() |
#11 | ||
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,480
Karma: 17777777
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Quote:
Code:
body { margin: 0; } p { margin: 0; padding: 0; text-indent: (whatever); } |
||
![]() |
![]() |
![]() |
#12 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,071
Karma: 1960
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
okay to be absolutely clear this is the correct css code? body {margin-left:0; margin-right:0; margin-top:0; margin_bottom.0 } I'm still confused if this is correct as to why you would not have a semicolon at the end of margin_bottom.0 |
|
![]() |
![]() |
![]() |
#13 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,071
Karma: 1960
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
![]() Thanks! |
|
![]() |
![]() |
![]() |
#14 | |
Sir Penguin of Edinburgh
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,359
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
Quote:
![]() I also don't understand why you think I dropped the semicolon. I didn't. Go look at my first post in this thread. The only error in it is that I used an underscore instead of a dash. |
|
![]() |
![]() |
![]() |
#15 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 70,344
Karma: 117888887
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The correct code is....
Code:
body { margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0; } p { text-indent: 1.1em } |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Embedding Chinese font using CSS override? | kome17 | Calibre | 0 | 09-18-2009 12:57 AM |
IMG css override not working anymore? | Amalthia | Calibre | 10 | 08-03-2009 01:12 AM |
help with Claibre CSS override | sideburnt | Calibre | 7 | 05-28-2009 08:25 PM |
centering images with css override? | Amalthia | Calibre | 2 | 03-30-2009 01:53 PM |
css override code for <h2> and <h1> tags | Amalthia | Calibre | 2 | 03-29-2009 06:51 PM |