View Single Post
Old 11-04-2023, 11:05 AM   #38
HeartWare
Enthusiast
HeartWare began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2023
Location: Copenhagen, DK
Device: ReadEra Android, Samsung Galaxy Tab S7+, Android 13
Quote:
Originally Posted by RbnJrg View Post
First Method:

a) In your .xhtml file:

Code:
    <p><img class="fl" alt="Tropical Beach" src="../Images/Tropical%20Beach.jpg"/>Lorem ipsum dolor sit amet, consectetur ... id est laborum.</p>
b) In your .css file:

Code:
img.fl {
    float: left;
    with: 100%;
    max-width: 9000px; /* This property is not well supported under epub2 */
}
Where do I specify the occupied width of the image (the 25%/33%/40%/50% etc)?

Quote:
Originally Posted by RbnJrg View Post
Second Method:

a) In your .xhtml file:

Code:
    <div class="image50L>
         <img alt="Tropical Beach" src="../Images/Tropical%20Beach.jpg"/>
    </div>

    <p>Lorem ipsum dolor sit amet, consectetur ... id est laborum.</p>
b) In your .css file:

Code:
.image50L {
    float: left;
    width: 50%;
}

.image50L img {
    with: 100%;
    max-width: 9000px; /* This property is not well supported under epub2 */
}
This one gives me the "larger than viewport" image and the "text within image" in Sigil.

Quote:
Originally Posted by RbnJrg View Post
Third Method:

a) In your .xhtml file:

Code:
    <div class="image50L>
         <img alt="Tropical Beach" src="../Images/Tropical%20Beach.jpg"/>

        <p>Lorem ipsum dolor sit amet, consectetur ... id est laborum.</p>
    </div>
b) In your .css file:

Code:
.image50L {
    width: 100%;
}

.image50L img {
    float: left;
    with: 50%;
    max-width: 9000px; /* This property is not well supported under epub2 */
}
This one also gives me the "larger than viewport" image but the text now flows below the image.
HeartWare is offline   Reply With Quote