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.

Archive

Floating Images

Started by Muut Archive 12 years ago · 3 replies · 453 views
12 years ago

Is there a way to create floating images in markdown so that text flows around the image?

12 years ago

it is possible with markdown_extra.

If you enable it in the page header or system.yaml then you can add a CSS class after the markdown for the image:

TXT
![](myimage.png)   {.float_right}

Then you can just provide some CSS for that class in custom.css or something:

CSS
.float_right { 
  float: right;
  margin: 0 0 1rem 1rem;
}
12 years ago

That works, thanks! I put my custom.css file in the theme's css directory, but will it remain there if there are updates to the theme? Or is there a proper location for CSS thats not part of the actual theme?

11 years ago

That's the correct location. It should not be effected by updates because it's not actually included in the theme itself.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1282 9 years ago
Archive · by Muut Archive, 9 years ago
2 889 9 years ago
Archive · by Muut Archive, 9 years ago
2 4019 9 years ago
Archive · by Muut Archive, 9 years ago
1 2894 9 years ago
Archive · by Muut Archive, 9 years ago
3 1078 9 years ago