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, 01: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,301
Karma: 16071131
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:	172
Size:	114.4 KB
ID:	104363   Click image for larger version

Name:	sigilbox.jpg
Views:	194
Size:	206.2 KB
ID:	104364  
crutledge is offline   Reply With Quote
Old 04-14-2013, 01:51 PM   #2
Terisa de morgan
Grand Sorcerer
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: 6,211
Karma: 11766195
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
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
Advert
Old 04-14-2013, 01: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,301
Karma: 16071131
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, 02: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: 12,119
Karma: 73448614
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Faulty css ? Missing ; on
Code:
padding:10px
PeterT is offline   Reply With Quote
Old 04-14-2013, 02: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: 7,514
Karma: 18512745
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 online now   Reply With Quote
Advert
Old 04-14-2013, 02: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, 03: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,301
Karma: 16071131
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, 02: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,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
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 07:06 AM
ADE question ButterflyBill ePub 2 10-01-2011 12:20 AM
Dumb ADE question Catlady General Discussions 23 08-04-2011 11:05 AM
PRS-300 Newbie question about ADE luthier58 Sony Reader 7 06-07-2010 04:23 PM
Another question about ADE crutledge Sigil 0 05-21-2010 05:03 PM


All times are GMT -4. The time now is 11:47 AM.


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