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 08-21-2010, 12:59 AM   #1
Haidon
Member
Haidon is on a distinguished road
 
Posts: 19
Karma: 69
Join Date: Jul 2008
Device: Sony PRS-505
ePub files do not center a custom <hr /> tag!

Well, this is annoying. I've set up a custom <hr /> tag that is supposed to look like those fancy triple asterisms you see in real printed books. I've used the following css:

Code:
hr { display: block; height: 1.15em; background: #FFFFFF url(../img/hr.svg) no-repeat scroll center; border: none; margin: 1em auto; }
Everything works fine except for the centering! I've also tried 'text-align:center;', and you'll see that the background tag tells it to center as well as the margin tag! (I added 'display:block;' just to see if that did anything—no luck.) Does the ePub specification not include this? Is the software just broken? Or am I doing it wrong?
Haidon is offline   Reply With Quote
Old 08-21-2010, 03:20 AM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 63,648
Karma: 41565251
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
Yes, this is a well-known bug in ADE. You have to centre your rule by setting a left margin equal to half the space left over by it. Eg, if your rule is 20% of the page width, set the left margin to 40% (half of the 80% not occupied by the rule).
HarryT is online now   Reply With Quote
Old 08-21-2010, 04:29 AM   #3
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,188
Karma: 727236
Join Date: Sep 2009
Device: PRS-505
See this thread.
charleski is offline   Reply With Quote
Reply

Tags
css, epub

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom PDF files for Kindle lyrx Kindle Developer's Corner 22 11-29-2010 01:45 PM
<pre> tag issue while conveting to epub Colaveare Calibre 8 10-09-2010 12:02 AM
LRF to EPUB: Each line is a paragraph tag wudaben Calibre 5 07-14-2010 07:04 PM
ePub with custom .css on a 505 dicknskip Sony Reader Dev Corner 3 06-09-2010 11:34 PM
Custom Icons for Your ePub Files Zero9 ePub 1 06-09-2009 07:45 PM


All times are GMT -4. The time now is 10:30 AM.


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