View Single Post
Old 12-01-2016, 01:26 AM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,681
Karma: 169712392
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by ralphiedee View Post
as I look in the stylesheet I see all the css for the images so do I need to create a class and have separate images names to declare the different sizes? Any help?


Code:
._idgenobjectattribute1 {
    height: 88px;
    line-height: 1.2;
    width: 88px
    }
At times, I've gone through and replaced all absolute image sizes with relative images sizes. Generally, I assume the smallest screen size would be 600 pixels wide by 800 tall so generate a percentage size base on the image width in pixels divided by 6 and tossing the height setting. You can treat the height the same if preferred using /8 to get the percentage if preferred.

Code:
._idgenobjectattribute1 {
    width : 15%;
    height : auto;
    }

 or

._idgenobjectattribute1 {
    width :  auto;
    height : 11%;
    }
This has the advantage for me that the image uses the same portion of the screen on any of my ereaders instead of going from half page width on a older low resolution device to thumbnail size on my KA1. For the most part I don't worry about exact numbers and round to the nearest integer percentage (15% instead of 14.67% in the example above).
DNSB is offline   Reply With Quote