Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 10-07-2014, 05:36 PM   #1
JaniceGF
Junior Member
JaniceGF began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2014
Device: nexus 7
Centering a picture

Hi,
I have a docx file which I have imported into Calibre. There are glifs in it, between sections, and Calibre treats them like text instead of pictures. As a result, the picture is left justified instead of centered on the page. I have tried to change the css without success. Can someone tell me how to do that?

<p class="block_8"><img src="images/image1.png" alt="Stag_Head_clip_art_small" class="calibre4"/></p>

is what Calibre has written.

BLock_8

.block_8 {
display: block;
font-family: "Times New Roman", serif;
font-size: 1.125em;
line-height: 1.5;
text-align: center;
text-indent: 36pt;
padding: 0;
margin: 6pt 0 0
}

Inherited
calibre {
color: black;
display: block;
font-family: "Arial", sans-serif;
font-size: 1em;
padding-left: 0;
padding-right: 0;
margin: 0 5pt
}

Thanks
JaniceGF is offline   Reply With Quote
Old 10-08-2014, 02:51 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
From a quick glance it should work fine. On what device/program are you seeing a different result?
Toxaris is offline   Reply With Quote
Advert
Old 10-08-2014, 03:07 AM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,257
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Toxaris View Post
From a quick glance it should work fine. On what device/program are you seeing a different result?
Actually, it won't work fine. The 6pt left margin will make the images off-center.
JSWolf is offline   Reply With Quote
Old 10-08-2014, 03:39 AM   #4
DigitEditLab
Member
DigitEditLab began at the beginning.
 
DigitEditLab's Avatar
 
Posts: 21
Karma: 10
Join Date: Feb 2014
Device: Kobo Aura HD, Samsung Note II, Kindle and a few more
Just wonder... In .block_8 try either of the following, then both together:

margin: 6pt 0 0 0; (shorthand for margin-top margin-right margin-bottom margin-left)
text-indent:0px; (it might entail an offset to the right)

So what?
DigitEditLab is offline   Reply With Quote
Old 10-08-2014, 07:27 AM   #5
loximuthal
Connoisseur
loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.loximuthal has not lost his or her sense of wonder.
 
loximuthal's Avatar
 
Posts: 81
Karma: 86158
Join Date: Jan 2011
Location: Maryland
Device: NST, Kindle Fire, iPad2
I'm guessing it's the text-indent: 36pt; in .block_8 throwing the alignment off.
loximuthal is offline   Reply With Quote
Advert
Old 10-08-2014, 10:07 AM   #6
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Text indent and margin should perhaps move the picture a bit off centre, but not left justified.
Toxaris is offline   Reply With Quote
Old 10-08-2014, 10:13 AM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,916
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
is this another case of ADE tossing out the CSS and what else you see is just viewer 'default'?

Try adding:
Code:
font-weight: bold;
to a style on a normal paragraph
theducks is offline   Reply With Quote
Old 10-08-2014, 10:41 AM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,257
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Could be that there is an error in the CSS and ADE is ignore the entire thing.

Post your CSS and someone might see what's going on.
JSWolf is offline   Reply With Quote
Old 10-08-2014, 11:52 AM   #9
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
This is where loading it in the editor and using the live css function can help. It will show all the css which applies at this particular point.
mrmikel is offline   Reply With Quote
Old 10-08-2014, 03:22 PM   #10
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,257
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by mrmikel View Post
This is where loading it in the editor and using the live css function can help. It will show all the css which applies at this particular point.
But will the editor say if there is an error someplace else int he CSS that will cause ADE to ignore then entire CSS?
JSWolf is offline   Reply With Quote
Old 10-08-2014, 06:15 PM   #11
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by JSWolf View Post
But will the editor say if there is an error someplace else int he CSS that will cause ADE to ignore then entire CSS?
Check Book will, so yes.

(At least, ordinary errors. Who knows if ADE will throw a hissy fit over something totally normal; calibre probably doesn't have a check for every stupid bug ADE has.)
eschwartz is offline   Reply With Quote
Old 10-08-2014, 06:57 PM   #12
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
It can also be checked at

http://www.css-validator.org/

to take care of errors in the stylesheet itself.
mrmikel is offline   Reply With Quote
Old 10-08-2014, 07:37 PM   #13
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,916
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 older device has a hissy over some valid CSS3 is in the stylesheet.

We know the rule is to ignore unknown commands.


We know in reality it ignore the whole sheet.
theducks is offline   Reply With Quote
Old 10-10-2014, 09:05 AM   #14
JaniceGF
Junior Member
JaniceGF began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2014
Device: nexus 7
Quote:
Originally Posted by Toxaris View Post
From a quick glance it should work fine. On what device/program are you seeing a different result?
I viewed it on the sony ready on my PC and Aldiko on my Nexus 7. Both had the glif left justified.
JaniceGF is offline   Reply With Quote
Old 10-10-2014, 09:13 AM   #15
JaniceGF
Junior Member
JaniceGF began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2014
Device: nexus 7
I included the css in my original message. I also tried margin:auto and got

.block_8 {
display: block;
font-family: "Times New Roman", serif;
font-size: 1.125em;
line-height: 1.5;
text-align: center;
text-indent: 0;
padding: 0;
margin: 6pt auto auto

in the computed style, margin left and right are 0.
JaniceGF is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centering images perkin5 Conversion 8 09-19-2014 10:40 AM
Centering blockquotes ghostyjack ePub 6 07-17-2014 06:07 AM
Nook not centering anything. why? kateharp ePub 0 05-11-2011 10:53 PM
Centering PDF nguirado Amazon Kindle 5 10-04-2010 08:45 PM
How to do centering sjohnson717 Calibre 15 02-28-2010 09:20 AM


All times are GMT -4. The time now is 04:27 PM.


MobileRead.com is a privately owned, operated and funded community.