View Single Post
Old 01-02-2026, 10:46 AM   #51
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,895
Karma: 8821309
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by JSWolf View Post
I've taken the Nancy Drew book from StandardEBooks and edited it. I made as little changes as possible to make it work in the old version of RMSDK and still be ePub 3. Can someone have a look and see what you think of the code? I've not made many changes to get it to work.
I opened the epub you posted in Sigil and there are some errors. But apart from that, I would change the code to handle the cover and titlepage. For the title image (titlepage.xhtml), I would use an SVG wrapper, which is well supported by ADE Legacy and allows the image to be centered and maintain its proportions. For example, I would use the following code:

Code:
<body>
  <section id="titlepage" epub:type="titlepage">
    <div class="center">

      <svg class="epub-type-contains-word-se-image-color-depth-black-on-transparent" xmlns="http://www.w3.org/2000/svg" height="100%" width="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 100 698 364" xmlns:xlink="http://www.w3.org/1999/xlink"><image width="698" height="364" xlink:href="../images/titlepage.png"/></svg>
    </div>
  </section>
and

Code:
svg.epub-type-contains-word-se-image-color-depth-black-on-transparent {
  background: #fff !important;
/* !important` is required to make sure readers respect the BG color */
  height: 95%; /* This is for ADE */
  height: 95vh; /* This is for epub3 and is ignored by ADE */
}
In Sigil with the above code, the title page looks as:

Click image for larger version

Name:	One1.jpg
Views:	14
Size:	428.0 KB
ID:	220032

and with the original code, the title page looks as:

Click image for larger version

Name:	One2.jpg
Views:	11
Size:	435.5 KB
ID:	220033

The advantage of using an SVG wrapper is obvious. Of course, it's your decision whether to adopt it or not.
RbnJrg is online now   Reply With Quote