Place Image to Right of Text

+1 vote
asked Mar 13 by Harts641 (170 points)
Hi all,

I'm using Harlowe 2.1. Just wondering if it is possible to place an image to the right of my text in a passage? I want it to appear in line with the text, not underneath it, which is all I seem to be managing to do at the moment.



1 Answer

+1 vote
answered Mar 13 by Akjosch (4,340 points)
selected Mar 13 by Harts641
Best answer

Just "float" it to the right side using a bit of CSS. For example, if your page looks something like this:

<img class="right-side large" src=""> Double-click this passage to edit it.

Lorem Ipsum is simply dummy text of the printing and typesetting industry.
<hr class="clear">
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

... then this bit of story stylesheet will do what you want it to do:

img.right-side {
  float: right;

img.small {
  height: 3em;

img.medium {
  height: 9em;

img.large {
  height: 15em;

hr.clear {
  clear: both;
  border: 0;

The "class" part of the <img> tag tells it to "float" to the right of the text ("right-side") as well as determine it height in text lines ("small", "medium" and "large" correspond to 2, 6 and 10 lines respectively). The <hr class="clear"> inserts an invisible break in the text which does nothing if there is no image - or anything else - "floating" around the page, else forces the text following it to be below all the "floating" elements encountered so far.

commented Mar 13 by Harts641 (170 points)
Thank you so much! Much appreciated.
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.