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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Wrapping Image around text

Started by Robert Reinhardt 9 years ago · 1 replies · 1968 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 Thomas, 1 week ago
2 51 7 hours ago
Support · by Anna, 2 days ago
2 58 10 hours ago
Support · by Justin Young, 11 hours ago
1 30 11 hours ago
Support · by Duc , 1 week ago
2 63 5 days ago
Support · by Colin Hume, 1 week ago
2 55 5 days ago