Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Wrapping Image around text

Started by Robert Reinhardt 9 years ago · 1 replies · 2520 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 TomW, 2 weeks ago
8 227 8 hours ago
Support · by alex, 2 months ago
8 667 23 hours ago
Support · by Supple, 5 days ago
1 98 1 day ago
Support · by TomW, 1 week ago
3 159 3 days ago
Support · by TomW, 6 days ago
2 106 5 days ago