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 05-06-2019, 10:32 PM   #16
lumpynose
Addict
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 283
Karma: 1064114
Join Date: Jul 2012
Device: eBookMan EBM-900
Quote:
Originally Posted by RbnJrg View Post
That is not a solution for the present case; you can use .svg but not as svg wrapper but as a svg image.
Not surprising; I've never used svg and threw that out there not knowing if it would help or not.
lumpynose is offline   Reply With Quote
Old 05-07-2019, 04:03 AM   #17
odedta
Addict
odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.
 
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
Quote:
Originally Posted by RbnJrg View Post
The following code seems to work fine with epub3:

Code:
  <h2 class="bird"><img class="birdy" alt="bird" src="../Images/bird.png"/>Preface</h2>

  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac tellus nunc. Phasellus imperdiet leo metus, et gravida lacus. Donec metus ligula, elementum at pellentesque pellentesque, suscipit ac nunc. Etiam lobortis, massa ac aliquam auctor, augue nisl sagittis urna, at dapibus tellus erat ullamcorper ligula. Praesent orci dui, pulvinar id convallis a, faucibus non mauris. Donec tellus augue, tempus sed facilisis sed, fringilla quis leo. Mauris vulputate, leo ac facilisis vulputate, enim orci interdum augue, in blandit quam turpis quis dui. Morbi dictum luctus velit nec faucibus. Cras vitae tortor purus, ut tincidunt mauris. Sed at velit nisl. Donec eu mauris tortor, interdum condimentum erat. Nam egestas turpis eget nibh laoreet pharetra. Suspendisse a sem eros, ut pulvinar enim. In sed elit eu nulla accumsan tincidunt eget sit amet ipsum. Nullam ut massa rutrum dolor placerat tempor accumsan eget purus.</p>
and:

Code:
p {
     text-align: justify;
}

.bird {
     width: 40%;
     margin: 2em auto;
     padding: 20px;
     background: #4D4D4F;
     color: white;
     border-radius: 70px;
     text-align: left;
     text-indent: 0;
     font-style: italic;
     font-weight: bold;
     font-family: serif;
     font-size: 50px;
}

.birdy {
     float: left;
     height: 74px;
     width: 71px;
     margin-top: -73px;
     margin-left: -25px;
}
Attachment 171338

Below you can check the respective epub.

Regards
Rubén
Hey Ruben, the result of your code is attached.

Why does kindle add a background to a png file ://////////////
odedta is offline   Reply With Quote
Old 05-07-2019, 07:34 AM   #18
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,039
Karma: 3777777
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by odedta View Post
Hey Ruben, the result of your code is attached.

Why does kindle add a background to a png file ://////////////
If you posted a screenshoot of how things are displayed under Kindle, then sorry because I can't see it I opened your bird.png and indeed, it has an alpha channel and the background is transparent (in principle, that is not bad). Please, post again the screenshoot.
RbnJrg is offline   Reply With Quote
Old 05-07-2019, 01:39 PM   #19
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: 7,478
Karma: 68413397
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by RbnJrg View Post
You need to set a "width" and "height" for the bird, specially if you are going to use a pseudo-element (in this case, ::before). Kindle (.kf8/.KFX formats, is ok Hitch? ) supports pseudo-element, so you can use it (if you wish).

In that case, you'll need to use something like:

Code:
.bird::before {
     display: block;
     content: url("../Images/bird.png");
     position: relative;
     width: your_width_here; 
     height: your_height_here;
     top: ?;  /* try to locate the best top */
     left: ?; /* idem above */
}
Regards
Rubén

Yup, it's fine for KF8/KFX, but of course, it's ixnay for the other, KF7. That will...lemme see...you'll either get a big mess, or it won't appear altogether. I would recommend a MQ making it hidden, for KF7, methinks.

Hitch
Hitch 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
Element <y> not permitted anywhere... Telyt Editor 4 02-03-2015 07:36 PM
Why Not Pantech Element? robertc88 Android Devices 1 02-26-2013 10:25 AM
unfinished element? Oldpilot Sigil 6 11-02-2010 08:32 PM


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


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