CSS shape-outside Property
Defines a shape that adjacent inline content should wrap around
Syntax
shape-outside: none | <basic-shape> | <image> | margin-box | border-box | padding-box | content-box;Values
| Value | Description |
|---|---|
| none | No shape (default) |
| circle() | Circular shape |
| ellipse() | Elliptical shape |
| polygon() | Polygonal shape |
| url() | Image-based shape |
Example
.float-circle {
float: left;
shape-outside: circle(50%);
width: 200px;
height: 200px;
border-radius: 50%;
}Understanding CSS shape-outside
The CSS shape-outside property defines a shape that adjacent inline content should wrap around. As part of the Misc module in CSS, it is one of the most commonly used properties for controlling the visual presentation of web pages.
You can set shape-outside to values such as none, circle(), ellipse(), polygon(), among others. Each value changes how the browser renders the affected element, giving you fine-grained control over your page layout and design. Choosing the right value depends on the specific design requirements of your project.
Common use cases for the shape-outside property include responsive web design, component-based layouts, and creating visually consistent interfaces across devices. It works closely with related properties like shape-margin, shape-image-threshold, float to achieve complex styling effects. Understanding how these properties interact helps you write cleaner, more maintainable stylesheets.
Browser support for shape-outside is excellent across all modern browsers including Chrome, Firefox, Safari, and Edge. For older browsers, consider using fallback values or progressive enhancement strategies. The property can also be set dynamically via JavaScript using element.style.shapeOutside or the CSS custom properties (variables) approach for theming.
Related Properties
shape-marginSets a margin for a CSS shape created using shape-outside
shape-image-thresholdSets the alpha threshold for extracting a shape from an image used with shape-outside
floatPlaces an element along the left or right side of its container
clip-pathCreates a clipping region that determines which parts of an element are visible
Explore More CSS Properties
Browse our complete reference of 251 CSS properties with syntax, examples, and tips.