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, 06:19 AM   #1
soparch
Member
soparch began at the beginning.
 
Posts: 24
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, 06: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: 520
Karma: 570148
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles
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
Old 03-29-2012, 10: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: 6,259
Karma: 4801165
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 offline   Reply With Quote
Old 03-29-2012, 10: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: 37,884
Karma: 18755150
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
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, 02:13 PM   #5
mmat1
Det
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: 982
Karma: 1406156
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 02:20 PM.
mmat1 is offline   Reply With Quote
Old 03-29-2012, 02:18 PM   #6
mmat1
Det
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: 982
Karma: 1406156
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 02: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 05:23 AM
Advice about line-height Julien Pham Sigil 2 12-22-2011 10:05 AM
epubcheck doesn't like <div>s marciarampart ePub 8 11-27-2011 04:13 AM
Center a div marcelo2605 ePub 4 05-13-2011 08:39 AM
Max-Height theducks Sigil 6 09-02-2010 06:40 PM


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


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