View Single Post
Old 01-05-2011, 12:59 AM   #38
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by panda6855 View Post
Thanks Hitch. Very enlightening and clarifying for me - big AHA!.


Yes - only by viewing the files on iPad. Having seen your post, I've now looked at the files in Adobe Digital Editions and see the difference. Those paras don't align left in ADE but ADE adds return (line space) after every paragraph break.


Aha. Thanks, I'd love to try that. Being a newbie to code... where EXACTLY do I place that code? Is it on every page or on every paragraph? And what EXACTLY should the added code be - how should it read? Should I post a full page of code so you can see and advise?


I believe it does, thanks. I hadn't thought of the device being the issue. Interesting how the different readers render the same file in such different ways. However, the book looks dreadful with the left alignment on those pages so my preference would be to minimise the risk of that happening by adding the code you suggest.
(Btw, I just posted what I understood I was asked to post.)

Many thanks for help.
When you ask, "Where EXACTLY do I place that code..." you're asking me how to build a car when you don't know how to change a tire. I'm not trying to be rude, but you're trying to format for iBooks--the most difficult of the devices, because it ignores the CSS that we normally use in ePUB and so we have to use workarounds--when you don't even know how to use CSS.

You'll have to learn about CSS: Go here: http://www.w3schools.com/

and learn how inline styles, internal stylesheets and external stylesheets work, and how to use them. Because what you're asking isn't a one-solution problem, because you will have numerous elements on any given "page" or "chapter," and to center them will take an equal number of solutions, that is, what centers a heading mightn't work for something else, or mightn't be needed for something else.

In general, to center a paragraph in iBooks, you'll have to create a class of paragraphs, something like:

p.center
{text-align:center;
text-indent:0px}

Which you'll include EITHER in the internal or external stylesheet, and then, in the actual code in the codeview page, you will have something like

<p class="center"><span>SOME TEXT GOES HERE</span></p>

BUT, this will only work on the paragraphs that have this precise coding, and it won't solve your problem with headers and images, so, as I said, I'm afraid you're going to have to learn a little CSS first in order to apply what you need to apply. Don't fear--it won't be a LOT of CSS, but you'll need to learn a little.

Hitch
Hitch is offline   Reply With Quote