Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 12-03-2012, 06:48 PM   #1
yakimeshi
Junior Member
yakimeshi began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Oct 2012
Device: none
Question about image

Hi,

I am trying to have my image center and adjust the size automatically when the viewers enlarge the tablets.

===============================
<head>
<title>The Creativity Revolution</title>
<link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />
<link href="../Styles/page_styles.css" rel="stylesheet" type="text/css" />

<style type="text/css">

p.sgc-2 {text-align: center;}
div.sgc-1 {text-align: center;}
</style>
</head>

<body class="calibre">
<div class="sgc-1"><img alt="" src="../Images/Alabamafinal72.jpg" /></div>

<path gradientshapeok="t"></path>

</body>
</html>
=================================

can anyone please help out here?
yakimeshi is offline   Reply With Quote
Old 12-03-2012, 11:18 PM   #2
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
This message moved to ePub as it has nothing to do with Sigil.
DaleDe is offline   Reply With Quote
Old 12-04-2012, 04:37 AM   #3
me too
Connoisseur
me too is no ebook tyro.me too is no ebook tyro.me too is no ebook tyro.me too is no ebook tyro.me too is no ebook tyro.me too is no ebook tyro.me too is no ebook tyro.me too is no ebook tyro.me too is no ebook tyro.me too is no ebook tyro.
 
Posts: 57
Karma: 1350
Join Date: Jul 2012
Location: India
Device: none
hello
i dont know whether you have solved the question or not any ways i have tried your code and it is working fine!
me too is offline   Reply With Quote
Old 12-04-2012, 04:55 AM   #4
Aerys
Connoisseur
Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.Aerys is faster than slow light.
 
Aerys's Avatar
 
Posts: 51
Karma: 29994
Join Date: Nov 2011
Location: Manila, Philippines
Device: iPad 2 & Nexus 7
If your targeting an iPad or ADE device then better use an SVG code for the image.
Aerys is offline   Reply With Quote
Old 12-06-2012, 10:16 AM   #5
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
to get images to center on iOS you should make them inline-blocks and wrap them in a div:

css:

.my_div { width:100%; text-align:center; }
.my_img { width:80%; display:inline-block; }

html:

<div class="my_div">
<img alt="My Image" class="my_img" src="path/img.jpg" />
</div>

this will center the image, which will be sized to 80% of the width of the frame.
mzmm is offline   Reply With Quote
Old 12-07-2012, 04:36 AM   #6
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,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
You don't need inline-block (unless the reader is buggy), which is unsupported in ePub 2.1 anyway.
Jellby is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cover image isn't displaying as cover image Eugene88 Sigil 3 08-15-2012 04:05 PM
Image overlayed over text (but text visible if image disabled)? Kaylee Skylyn ePub 5 08-01-2012 05:27 PM
Sigil Cover image Question ralphiedee Sigil 9 05-30-2012 10:54 AM
Image captions --- how to keep with image? GrannyGrump ePub 7 01-31-2012 12:38 PM
"Insert Image" renames .jpg's incorrectly... but shows the correct image! megacoupe Sigil 4 03-06-2011 08:13 PM


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


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