Read more

CSS: Letting text flow around a round element

Dominik Schöler
January 10, 2024Software engineer at makandra GmbH

If you have an element with significant border-radius (e.g. 50% for a circle) and you want inline content (i.e. text) to flow around it, do it like this:

  --margin: 10px;
  shape-outside: content-box;
  margin-left: var(--margin);
  margin-bottom: var(--margin);
  shape-margin: var(--margin);
Illustration money motivation

Opscomplete powered by makandra brand

Save money by migrating from AWS to our fully managed hosting in Germany.

  • Trusted by over 100 customers
  • Ready to use with Ruby, Node.js, PHP
  • Proactive management by operations experts
Read more Show archive.org snapshot

Image

Posted by Dominik Schöler to makandra dev (2024-01-10 13:21)