Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-04-2015, 06:43 AM   #16
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,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by JLius View Post
When I use "width: 5em", the .gif is no longer centered.
I tried font-size: 1em instead, but that does not make the .gif rescale. Any other suggestions?
Show the code, please. "font-size: 1em" is a no-op, I don't know what you expect to get from that.

Quote:
Originally Posted by Notjohn View Post
Should I be adding max-width="100%" to my style sheet to prevent such over-runs?
It will only prevent it as long as the reader obeys the CSS (which is not only the case). You can also use an SVG wrapper for the cover, the code for which you can find elsewhere in the forum.
Jellby is offline   Reply With Quote
Old 04-04-2015, 07:22 AM   #17
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
@Jelby

I'm just trying to get the .gif to scale along when you change font-size on a reader.

The code:
Code:
.stroke {
  display: block;  
  margin-top: 1.35em;
	text-indent:0em;
	text-align:center;
}
Html:
Code:
<p class="stroke">

    <img src="Stroke2.gif" alt="Afbeelding"/>

  </p>
@Notjohn

Code:
 <div>
            <svg version="1.1" xmlns="http://www.w3.org/2000/svg"
                xmlns:xlink="http://www.w3.org/1999/xlink"
                width="100%" height="100%" viewBox="0 0 2480 3508"
                preserveAspectRatio="xMidYMid meet">
                <image width="2480" height="3508" xlink:href="cover.jpg"/>
            </svg>
        </div>
    </body>
</html>
JLius is offline   Reply With Quote
Advert
Old 04-04-2015, 07:58 AM   #18
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,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Try adding this CSS:

Code:
.stroke img {
  width: 5em; /*or whatever is appropriate */
}
Or, if you have several images with different sizes:

Code:
<p class="stroke">
    <img src="Stroke1.gif" alt="Afbeelding" id="img1"/>
</p>

<p class="stroke">
    <img src="Stroke2.gif" alt="Afbeelding" id="img2"/>
</p>
Code:
img#img1 {
  width: 3em;
}
img#img2 {
  width: 5em;
}
PS. Do you actually want "Afbeelding" to show up when the image cannot be displayed? Think of text-to-speech, for instance.
Jellby is offline   Reply With Quote
Old 04-04-2015, 09:01 AM   #19
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
Yes! That works, thank you.
I changed "afbeelding" to break, cause that's what it's supposed to be, a scene break.
JLius is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
BUG in PDF Reader - TeX math displaying ereus Onyx Boox 9 02-06-2014 01:55 PM
Aldiko ebook reader not displaying CSS attributes ebookn00b Android Devices 3 01-17-2013 03:20 PM
Gif images not showing in epub Amalthia Conversion 9 06-07-2012 03:43 PM
Just change the screensaver GIF files? namati Kindle Developer's Corner 3 02-25-2012 11:40 PM
My nook hates my .gif files. EricDP ePub 7 09-09-2010 10:19 AM


All times are GMT -4. The time now is 05:18 AM.


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