View Single Post
Old 11-04-2023, 06:45 AM   #22
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,567
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by HeartWare View Post
Unfortunately, that doesn't seem to work in either Sigil or Calibre. The image occupies the full width with the text below it.

The relevant code from the xhtml is:

<html>
<head>
<link href="../Styles/Style0001.css" type="text/css" rel="stylesheet"/>
</head>

<body>
<div class="image50L"><img alt="Tropical Beach" src="../Images/Tropical%20Beach.jpg"/>Lorem ipsum ... id est laborum.</div>
</body>
</hrml>

and the stylesheet:

.image50L {width=50%; float:left}
img {width:100%; max-width: 9000px}


I have enclosed my test ePub...
The property "float: left" must be for the selector img, not for the style img50L. Use something like this:

Code:
<div class="image50L">
     <img alt="Tropical Beach" src="../Images/Tropical%20Beach.jpg"/>
     <p>Lorem ipsum ... id est laborum....</p>
</div>

.............

.image50L {
    width=100%;
}

.image50L  img {
     float: left;
     width:50%; 
     max-width: 9000px
}

Last edited by RbnJrg; 11-04-2023 at 07:07 AM.
RbnJrg is offline   Reply With Quote