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 · 2211 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 Anna, 14 hours ago
1 43 7 hours ago
Support · by gtx, 1 week ago
4 227 1 day ago
Support · by Paul Hodges, 2 weeks ago
13 274 5 days ago
Support · by Anna, 3 weeks ago
9 333 1 week ago
Support · by TomW, 2 weeks ago
4 187 1 week ago