Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-14-2013, 02:14 PM   #1
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,160
Karma: 15944507
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Question about ADE

I have the following definition in the CSS:

Code:
.centerbox{
width:50%;
padding:10px
font-size : 90%;
margin-left:auto;
margin-right:auto;
margin-bottom:1em;
}
It displays properly centered on the page in Sigi, Calibre ePub reader, Kindle, and Sony but in ADE it is left justified. See attached images.

Is this a problem with ADE or have I missed something?

Thanks
Attached Thumbnails
Click image for larger version

Name:	adebox.jpg
Views:	74
Size:	114.4 KB
ID:	104363   Click image for larger version

Name:	sigilbox.jpg
Views:	75
Size:	206.2 KB
ID:	104364  
crutledge is offline   Reply With Quote
Old 04-14-2013, 02:51 PM   #2
Terisa de morgan
Wizard
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 3,779
Karma: 3653425
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Aura, Kobo Mini, Kobo Aura HD, elephone, iPad, Galaxy Tab3 8
Where is the alignment in that definition?

I mean, for alignment I think you need:

Code:
text-alignment: center;
Terisa de morgan is offline   Reply With Quote
Old 04-14-2013, 02:58 PM   #3
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,160
Karma: 15944507
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Quote:
Originally Posted by Terisa de morgan View Post
Where is the alignment in that definition?

I mean, for alignment I think you need:

Code:
text-alignment: center;
I don't wish to center the text - only the block.
crutledge is offline   Reply With Quote
Old 04-14-2013, 03:08 PM   #4
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 9,405
Karma: 56044861
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
Faulty css ? Missing ; on
Code:
padding:10px
PeterT is offline   Reply With Quote
Old 04-14-2013, 03:12 PM   #5
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,997
Karma: 8796439
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by crutledge View Post
Code:
.centerbox{
margin-left:auto;
margin-right:auto;
}
That's the part that's centering the block, and the part that doesn't work in ADE, because, according to the ePub spec:

"Reading Systems may set the value of any margin property whose specified value is auto to 0."

and it seems ADE just chooses to do that, there's not much we can do.

But, since you are using a relative width, anyway (width:50%), you can get the desired effect with:

Code:
margin-left:25%;
margin-right:25%;
(actually, I'm surprised it works in the Sony, which version is it?)
Jellby is offline   Reply With Quote
Old 04-14-2013, 03:14 PM   #6
sellew
Enthusiast
sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.
 
Posts: 30
Karma: 300
Join Date: Oct 2011
Location: Barcelona
Device: Sony PRS-650, PRS-T2
Quote:
Originally Posted by crutledge View Post
I have the following definition in the CSS:

Code:
.centerbox{
width:50%;
padding:10px;
font-size : 90%;
margin-left:auto;
margin-right:auto;
margin-bottom:1em;
}
It displays properly centered on the page in Sigi, Calibre ePub reader, Kindle, and Sony but in ADE it is left justified. See attached images.

Is this a problem with ADE or have I missed something?

Thanks
Please note there is a semicolon missing in the 3rd line of your code. ADE will ignore the rest of the stylesheet if it finds any tiny error or mistype.
sellew is offline   Reply With Quote
Old 04-14-2013, 04:45 PM   #7
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,160
Karma: 15944507
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Quote:
Originally Posted by Jellby View Post
That's the part that's centering the block, and the part that doesn't work in ADE, because, according to the ePub spec:

"Reading Systems may set the value of any margin property whose specified value is auto to 0."

and it seems ADE just chooses to do that, there's not much we can do.

But, since you are using a relative width, anyway (width:50%), you can get the desired effect with:

Code:
margin-left:25%;
margin-right:25%;
(actually, I'm surprised it works in the Sony, which version is it?)
That did it. Thanks very much.

Charlie
crutledge is offline   Reply With Quote
Old 04-15-2013, 03:11 AM   #8
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,216
Karma: 109735549
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
You can also use this:

.center{text-align: center;}
.centerbox{width:50%; padding:10px font-size : 90%; margin-bottom:1em; }

<div class="center"><p class="centerbox">This text will be left-aligned, but centered in a block.</p></div>
Toxaris is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ADE Registry Question vanillabean ePub 4 05-30-2012 08:06 AM
ADE question ButterflyBill ePub 2 10-01-2011 01:20 AM
Dumb ADE question Catlady General Discussions 23 08-04-2011 12:05 PM
PRS-300 Newbie question about ADE luthier58 Sony Reader 7 06-07-2010 05:23 PM
Another question about ADE crutledge Sigil 0 05-21-2010 06:03 PM


All times are GMT -4. The time now is 05:25 PM.


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