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-17-2011, 01:54 PM   #1
marcelo2605
Member
marcelo2605 began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Apr 2011
Device: iPad
Image margins

I put the following code to my image:

Code:
img.image_left{
float:left;
text-align: left;
margin: 1em;
}
Works fine in ADE but in iBooks, the margin doesn't appear.
marcelo2605 is offline   Reply With Quote
Old 05-17-2011, 08:47 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: 9,540
Karma: 4597554
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
iBooks is broken. For a workaround place a border on the image. That is about all you can do.
DaleDe is offline   Reply With Quote
Old 05-18-2011, 10:10 AM   #3
marcelo2605
Member
marcelo2605 began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Apr 2011
Device: iPad
DaleDe, you mean leave a blank space in image file?
marcelo2605 is offline   Reply With Quote
Old 05-18-2011, 10:19 AM   #4
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: 36,528
Karma: 17733206
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
iBooks breaks even more rules then ADE.
JSWolf is offline   Reply With Quote
Old 05-18-2011, 10:44 AM   #5
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: 9,540
Karma: 4597554
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
Quote:
Originally Posted by marcelo2605 View Post
DaleDe, you mean leave a blank space in image file?
Yes, at the edge of the image, just like photographs used to do. It will guarantee a margin. IrfanView can add this.

Dale
DaleDe is offline   Reply With Quote
Old 05-19-2011, 09:33 AM   #6
marcelo2605
Member
marcelo2605 began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Apr 2011
Device: iPad
Thanks guy, I'm used to programming css for websites and am frustrated with the lack of standardization in the archives epubs
marcelo2605 is offline   Reply With Quote
Old 05-19-2011, 08:12 PM   #7
NASCARaddicted
Addict
NASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and grace
 
Posts: 310
Karma: 43106
Join Date: Apr 2009
Location: Germany
Device: BeBook One, Pocketbook Touch
I don't want to hijack your thread, but I have a similar problem, so instead of staring a new thread, I write it in here. If you have a problem with that, let me know it, please.

Here is my problem: I have an ebook with images. I want to have a margin of 2 em below and above the image.

Here is my code:

Code:
<p>bla bla bla</p>
<div class="Center"><img src="pic1.png" style="width:339px;height:288px;"  class="topbottom" alt="Pic 1" /></div>
<p>bla bla bla</p>
and here is my css

Code:
p { margin: 0; border: 0pt; text-indent: 1.5em; text-align:justify; }
.Center { text-align:center; }
.topbottom {margin-top:2em;  margin-bottom:2em;}
I think the p and Center is self explaining. I added the topbottom class to add a margin of 2 above and below the image. Now, in Firefox 4, it looks perfect. But when I put it on my reader (Bebook One, with ADE), there is a margin below the image, but not above. There is no margin between the paragraph and the following image.

Am I doing something wrong? Is that a problem with ADE? Or could this be caused by Calibre? I unzipped the finished epub, and looked at the css created by Calibre, but I saw nothing wrong there, too. Or is because I use p and div?

I hope someone out there can help me.

Last edited by NASCARaddicted; 05-19-2011 at 08:21 PM.
NASCARaddicted is offline   Reply With Quote
Old 05-19-2011, 10:57 PM   #8
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 350
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
Have you tried

<div class="image">
<img src="images/Title.png" alt="Title.png" height="95%" />
</div>



.image {
margin-top: 1em;
margin-bottom: 1em;
margin-left: 1.2em;
text-align: center;
}
Adjust is offline   Reply With Quote
Old 05-20-2011, 02:58 AM   #9
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,902
Karma: 2909045
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
It is like Adjust said. Definition in the CSS is not enough, you have to use it. Try the following:
Code:
<p>bla bla bla</p>
<div class="Center topbottom"><img src="pic1.png" style="width:339px;height:288px;" alt="Pic 1" /></div>
<p>bla bla bla</p>
or

Code:
<p>bla bla bla</p>
<p class="Center topbottom"><img src="pic1.png" style="width:339px;height:288px;" alt="Pic 1" /></p>
<p>bla bla bla</p>
which will probably work better.
Toxaris is offline   Reply With Quote
Old 05-20-2011, 08:33 PM   #10
NASCARaddicted
Addict
NASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and graceNASCARaddicted herds cats with both ease and grace
 
Posts: 310
Karma: 43106
Join Date: Apr 2009
Location: Germany
Device: BeBook One, Pocketbook Touch
thanks you two, you really helped me.
NASCARaddicted is offline   Reply With Quote
Old 05-21-2011, 01:16 PM   #11
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: 36,528
Karma: 17733206
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by marcelo2605 View Post
Thanks guy, I'm used to programming css for websites and am frustrated with the lack of standardization in the archives epubs
iBooks is the issue, ADE has it's quirks, but it works a lot more like you'd expect. iBooks sometimes just decides to do something totally different.
JSWolf 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
image and white margins Copycat Sigil 5 04-15-2011 05:10 AM
"Insert Image" renames .jpg's incorrectly... but shows the correct image! megacoupe Sigil 4 03-06-2011 08:13 PM
Margins in 6.3 Amalthia Calibre 19 07-10-2010 08:40 AM
Help with margins Switch Calibre 3 04-30-2010 02:53 AM
Margins cklammer EPUBReader 0 12-07-2009 02:55 AM


All times are GMT -4. The time now is 09:41 PM.


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