![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Oct 2012
Location: Winnipeg, Canada
Device: Sony PRS-505
|
problem with floating image and relative width
Hello Everyone,
I'm trying to float an image with a max-width of 50% but its not working correctly. The following code works well in ibooks and firefox epubreader (but it ends up filling the entire page in ADE, PRS-505,aldiko : Code:
<div><img alt="sage gemme" src="../Images/pic0002.png" style="float: right; max-width:50%;" /></div> Any input is appreciated. Thanks |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
For what it is worth here is what I use to float text round a drop cap image:
CSS div.illustrationL { margin: 0; padding: 0 0.25em 0 0; /* border: 1px solid black; */ width: 33%; float: left; } div.illustrationL img { border: 0; margin: 0; padding: 0; width: 100%; display: inline; } /* With thanks to Elizabeth Castro */ HTML <div class="illustrationL"> <img src="images/ch01cap.jpg" alt="alt text"/> </div> It works and validates, and is taken from Elizabeth Castro's HTML, XHTML, and CSS from Peach Pit Press. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Obsessively Dedicated...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,202
Karma: 34984330
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
I don't know if it is worth anything as advice, but also I usually set a maxwidth in pixels for images so they can't upsize too much. At most, 25% bigger than the native size. It might not be a "best practice" but keeps my images from fuzzing out and looming ominously.
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Oct 2012
Location: Winnipeg, Canada
Device: Sony PRS-505
|
Great thanks this worked perfectly
![]() |
![]() |
![]() |
![]() |
#5 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 97
Karma: 44418
Join Date: Jul 2013
Location: Mostly in my own head!
Device: Kindle Fire, iPad
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
weird image problem | radiocure | Conversion | 8 | 07-10-2011 04:10 PM |
Problem with masthead image | kindle3reader | Kindle Formats | 0 | 02-03-2011 04:29 PM |
Epub Image Problem | mets | Calibre | 5 | 09-21-2010 01:26 PM |
Setting Image width on news feed | Wiggles | Calibre | 2 | 08-13-2010 02:10 AM |
Image problem | mikeywilliams25 | Sigil | 1 | 10-18-2009 01:37 PM |