Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Wrapping Image around text

Started by Robert Reinhardt 9 years ago · 1 replies · 2315 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 complanar, 6 days ago
6 139 14 hours ago
Support · by Rick Beebe, 6 days ago
2 100 2 days ago
Support · by blu3prince, 3 days ago
0 50 3 days ago
Support · by alex, 4 days ago
2 92 3 days ago
Support · by Marcel, 2 weeks ago
1 143 4 days ago