Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Wrapping Image around text

Started by Robert Reinhardt 9 years ago · 1 replies · 2250 views
9 years ago

Greetings,

Thanks for reading this request. I'm attempting to wrap a few paragraphs around an image. Does anyone have the appropriate Markdown or Twig Code for this?

9 years ago

You need to do this with CSS.

Use float: right to push the image to the right of the text, and float: left to push it to the left of the text. The text will wrap around the image so long as the image is before the paragraphs in the HTML.

Here's a quick example.

HTML

HTML
<img id='image-id' src='path/to/url' />
<p>Text to wrap.</p>
<p>More text to wrap.</p>

CSS

TXT
#image-id {
    float: left
}

Suggested topics

Topic Participants Replies Views Activity
Support · by Paul Hodges, 4 weeks ago
19 484 5 days ago
Support · by Lauw, 7 days ago
2 99 7 days ago
Support · by Anna, 3 weeks ago
4 426 1 week ago
Support · by gtx, 4 weeks ago
4 377 3 weeks ago
Support · by Anna, 1 month ago
9 484 3 weeks ago