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 03-29-2012, 05:19 AM   #1
soparch
Enthusiast
soparch began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Jun 2010
Device: none
Image height in div

Hello,
I have a problem with an image. I have placed a vertical line image in a table with text in the cell next to it. In sigil and if you view the html the vertical line increase and decreases with the lines of text. Once I look at it in ADE though the line takes up the whole page. It seems that ADE takes the image height as 100% as per the code ignoring the <div>. How do I get it to work on ADE? do I have to do something with the div? It needs to be the height of the text in the cell next door no matter how many lines the text wraps to.
Here is the code.
<div>
<table border="0" style="margin-top: 15px;">
<tr>
<td style="vertical-align: bottom; width: 10px;"><img alt="vertical line" height="100%" src="../Images/gvline.jpg" width="5" /></td>

<td style="vertical-align: top;"><i>You need not leave your room. Remain sitting at your table and listen. You need not even listen, simply wait. You need not even wait, just learn to become quiet, still, and solitary. The world will freely offer itself to you to be unmasked. It has no choice; it will roll in ecstasy at your feet.</i> <small><b>Franz Kafka</b></small></td>
</tr>
</table>
</div>


Thanks in advance
Soparch
soparch is offline   Reply With Quote
Old 03-29-2012, 05:27 AM   #2
SBT
Fanatic
SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.
 
SBT's Avatar
 
Posts: 580
Karma: 810184
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles, iPad
I'd suggest setting width to 100% instead of height. Height in percent is always tricky in CSS2; It might work if you give the <div> enclosing the table a fixed height, but that doesn't seem to be what you require.
SBT is offline   Reply With Quote
Advert
Old 03-29-2012, 09:21 AM   #3
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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Think like a browser.

100% of what?
Of the container element.
What's the container element?
A <td>.
What's the height of the <td>?
Just as much as needed to hold its content.
What's its content?
An <img>.
What's the height of the <img>?
100%?
100% of what? ...
Jellby is online now   Reply With Quote
Old 03-29-2012, 09:33 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: 73,661
Karma: 127838198
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 SBT View Post
I'd suggest setting width to 100% instead of height. Height in percent is always tricky in CSS2; It might work if you give the <div> enclosing the table a fixed height, but that doesn't seem to be what you require.
Height as a percent works perfectly. I've never had an issue using height="100%". It works perfectly in ADE and Firefox. Using hright with a percent, I've always had the image scale to the correct percent of the screen.
JSWolf is offline   Reply With Quote
Old 03-29-2012, 01:13 PM   #5
mmat1
Berti
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by soparch View Post
I have a problem with an image. I have placed a vertical line image in a table with text in the cell next to it. In sigil and if you view the html the vertical line increase and decreases with the lines of text. Once I look at it in ADE though the line takes up the whole page. It seems that ADE takes the image height as 100% as per the code ignoring the
I guess, what you want is some text with a vertical bar to the left ?

What's about a <td> with a style { border-left: 2px solid black } ????

To to this with an image, the solution SBT suggests (restiction vertical size of the table) seems to be the only way.

Last edited by mmat1; 03-29-2012 at 01:20 PM.
mmat1 is offline   Reply With Quote
Advert
Old 03-29-2012, 01:18 PM   #6
mmat1
Berti
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by mmat1 View Post
I guess, what you want is some text with a vertical bar to the left ?

What's about a <td> with a style { border-left: 2px solid black } ????

To to this with an image, the solution SBT suggests (restiction vertical size of the table) seems to be the only way.
Did some corrections on quote of my own message, sorry

Last edited by mmat1; 03-29-2012 at 01:21 PM.
mmat1 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
What image height causes images to fill the screen? karenbryant ePub 7 01-04-2012 04:23 AM
Advice about line-height Julien Pham Sigil 2 12-22-2011 09:05 AM
epubcheck doesn't like <div>s marciarampart ePub 8 11-27-2011 03:13 AM
Center a div marcelo2605 ePub 4 05-13-2011 07:39 AM
Max-Height theducks Sigil 6 09-02-2010 05:40 PM


All times are GMT -4. The time now is 07:43 AM.


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