Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 05-19-2022, 06:42 AM   #1
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,894
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Resizing Images

Quote:
Originally Posted by Gunivortus View Post
Formatting the text works fine, but there are also pictures. I like to get them resized to the screen on which the book is read.
Now, the pictures are small at any device, just take ca. 1/4 of a screen.
How can I get them flexible resized?
Here is the CSS and HTML code that I use to size images to be the full screen keeping the correct aspect ratio.

CSS code:
Code:
body {
  widows: 1;
  orphans: 1;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  text-align: justify;
}
img {
  max-height: 100%;
  max-width: 100%;
}
.cover {
  text-align: center;
  text-indent: 0;
  height: 100%;
}
HTML code:
Code:
<div class="cover"><img alt="" class="cover" scr="../images/image.jpg"></div>
JSWolf is online now  
Old 05-19-2022, 07:00 AM   #2
Gunivortus
Enthusiast
Gunivortus began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Apr 2019
Device: Onyx Boox Note 3
Thanks! Where do I add that?
Gunivortus is offline  
Old 05-19-2022, 07:08 AM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,894
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Gunivortus View Post
Thanks! Where do I add that?
The CSS goes in the CSS file. Make sure you are not duplicating nay styles such as two body styles.

The HTML code goes where the code is to display your images. But you will need the correct source (path/filename). Get the source from the <img> that you are replacing.

The reason the class is called cover is because I use it mostly for the cover and title page.
JSWolf is online now  
Old 05-19-2022, 07:43 AM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Moderator Notice
@Jon: Do not take it upon yourself to "move" posts by cross replying in this manner. As I have mentioned many times: report posts you feel are in the wrong place. After that, your part of the process is officially over. I'm closing this (essentially) duplicate thread. You don't get to thwart the powers that be in this manner. You have been warned.

Last edited by DiapDealer; 05-19-2022 at 07:53 AM.
DiapDealer is offline  
Closed Thread


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing images in bulk? salty-horse Editor 9 01-15-2022 04:27 PM
Calibre is not resizing images etrnlflame Conversion 7 01-04-2019 02:43 PM
Glo prevent glo from resizing images ? leftright Kobo Reader 6 05-15-2014 04:04 AM
resizing in-line images pdurrant ePub 12 08-16-2013 04:08 AM
resizing images in recipes? schuster Recipes 5 05-16-2011 11:10 AM


All times are GMT -4. The time now is 08:17 AM.


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