Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-19-2010, 07:01 PM   #1
benjaminsolah
Marxist Horror Writer
benjaminsolah began at the beginning.
 
benjaminsolah's Avatar
 
Posts: 30
Karma: 10
Join Date: Sep 2010
Location: Melbourne, Australia
Device: Sony Reader Touch PRS-650
Editing image size

I have two images in my eBook, one I want to display on a separate screen, the other inline with a review.

How do you resize and align images with ePub code? I already do know some HTML and CSS but does the basic width and height tags within an img src work?
benjaminsolah is offline   Reply With Quote
Old 09-21-2010, 05:27 AM   #2
capidamonte
Not who you think I am...
capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.
 
capidamonte's Avatar
 
Posts: 374
Karma: 30283
Join Date: Jan 2010
Location: Honolulu
Device: PocketBook 360 -- Ivory
Better practice is to use an external style sheet.

Image sizing and floats work in ePubs.
capidamonte is offline   Reply With Quote
Advert
Old 09-21-2010, 06:28 AM   #3
paulpeer
Zealot
paulpeer is on a distinguished road
 
paulpeer's Avatar
 
Posts: 147
Karma: 56
Join Date: Dec 2009
Location: Antwerpen
Device: iPhone, Sony PRS-505, EPUBreader
Quote:
Originally Posted by benjaminsolah View Post
I have two images in my eBook, one I want to display on a separate screen, the other inline with a review.
If you want it to appear on a seperate screen, you put it in a seperate xhtml file. Right click on "Text" in the left column, and select "add new item". Put the picture there.
paulpeer is offline   Reply With Quote
Old 09-22-2010, 05:06 AM   #4
benjaminsolah
Marxist Horror Writer
benjaminsolah began at the beginning.
 
benjaminsolah's Avatar
 
Posts: 30
Karma: 10
Join Date: Sep 2010
Location: Melbourne, Australia
Device: Sony Reader Touch PRS-650
Ok, so adding the width="100%" doesn't seem to work. This is my code.

Quote:
<div class="P-P15" id="calibre_pb_8">
<div class="G-fr"><img alt="" class="calibre4" src="../Images/100000000000066B00000922ACB035C2.jpg" /></div>
These are the CSS styles.

Quote:
.P-P15 {
background-color: white;
display: block;
font-family: "Times New Roman", serif;
font-size: 1em;
line-height: 150%;
margin-bottom: 0.6cm;
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
page-break-before: always;
text-align: center
}
Quote:
.G-fr {
background-color: #fff;
border: none;
display: block;
font-size: 1em;
height: 17.141cm;
left: -0.508cm;
margin-bottom: 0;
margin-left: 0.319cm;
margin-right: 0.319cm;
margin-top: 0;
padding-bottom: 0.026cm;
padding-left: 0.026cm;
padding-right: 0.026cm;
padding-top: 0.026cm;
position: relative;
top: -0.318cm;
width: 10.791cm
}
I'm also slightly worried that changing them will change other things as well within that class.
benjaminsolah is offline   Reply With Quote
Old 09-22-2010, 11:59 AM   #5
paulpeer
Zealot
paulpeer is on a distinguished road
 
paulpeer's Avatar
 
Posts: 147
Karma: 56
Join Date: Dec 2009
Location: Antwerpen
Device: iPhone, Sony PRS-505, EPUBreader
Quote:
Originally Posted by benjaminsolah View Post
Ok, so adding the width="100%" doesn't seem to work. This is my code.
It does work for me all the time. Try first to add the width to one image only, e.g. the cover image:

Code:
<img alt="kovrilo" src="../Images/img0001.jpg" width="100%" />
If that works, the problem is somewhere else. I see that you use two nested divisions

Quote:
Originally Posted by benjaminsolah View Post
<div class="P-P15" id="calibre_pb_8">
<div class="G-fr">
which partly contradict each other, e.g.

Quote:
Originally Posted by benjaminsolah View Post
padding-top: 0.026cm;
and
padding-top: 0;
I wouldn't be surprised that your reader gets mad by those contradictary instructions, and simply ignores what you want ...
paulpeer is offline   Reply With Quote
Advert
Old 09-22-2010, 01:31 PM   #6
capidamonte
Not who you think I am...
capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.
 
capidamonte's Avatar
 
Posts: 374
Karma: 30283
Join Date: Jan 2010
Location: Honolulu
Device: PocketBook 360 -- Ivory
You're trying to edit Calibre sourced (X)HTML?

Or is it two sources, some conversion, like Word-sourced HTML that's then fed into Calibre?

Way, way too complicated, I think. You've got stuff with absolute sizes, too.

Get your source into simple (X)HTML, then you can do just about anything. Spending hours chasing down whatever computer-named class or id is causing your problem is wasted effort b/c it won't be repeatable next time. All the class-names and work-arounds will be different. Calibre is not a tool for production work, it's a tool for "good enough" conversion.

My opinion, but I'm actually trying to be helpful, not just tossing bombs. Simple-ish (X)HTML makes almost every problem solveable. Massively complicated computer-generated (X)HTML is only useful the way Calibre does it -- as a work-around, designed to minimize hassle for the user on conversion.

Your code is literally trying to place everything on the screen in an exact position. Fighting that is going to be a nightmare.

$0.02
capidamonte is offline   Reply With Quote
Old 09-22-2010, 06:47 PM   #7
benjaminsolah
Marxist Horror Writer
benjaminsolah began at the beginning.
 
benjaminsolah's Avatar
 
Posts: 30
Karma: 10
Join Date: Sep 2010
Location: Melbourne, Australia
Device: Sony Reader Touch PRS-650
I got it to work. I think I'll try to make my own EPUB file next time though.
benjaminsolah 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 Size benjaminsolah ePub 13 09-24-2010 11:47 PM
How to get the maximum image size on a DX? Diegan Amazon Kindle 1 08-04-2010 12:05 PM
Cover image size crutledge Sigil 3 08-02-2010 03:31 AM
Cover Image Size gr8npwrfl Calibre 0 12-21-2009 12:49 AM
Image Size for Sony reader 700 Hussein Sony Reader 9 12-10-2008 07:39 AM


All times are GMT -4. The time now is 10:05 PM.


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