---
title: Level up your design with this CSS property
url: "https://aaronfrancis.com/videos/level-up-your-design-with-this-css-property"
path: "/videos/level-up-your-design-with-this-css-property"
type: video
author: Aaron Francis
published: 2025-07-16
keywords: [shape-outside, css, magazine layout, floats, text wrapping, clip-path, polygon, print design, web design, responsive design, css shapes, layout techniques]
youtube_url: "https://www.youtube.com/watch?v=ynExo2UUFro"
site_index: "/llms.txt"
keyword_index: "/llms/keywords.txt"
---

# Level up your design with this CSS property

## Chapters

- Redesigning my site with a magazine layout
- The CSS property you’ve never used: shape-outside
- Why shape-outside needs floats
- Laying out the initial images and content
- The problem with box-shaped margins
- Creating a polygon visually with a clip-path tool
- Why percent-based coordinates are important
- Applying the effect to the second image
- Hiding the second image on small screens
- Pulling inspiration from print design

## Transcript

**Aaron Francis:** I'm redesigning my personal website. I know. Developers are always doing that, but I only do this once every several years, and this is what we're gonna be building today. Look at this. Look at this beautiful outline. Look at that. It follows the shape of this picture, and it looks super awesome. And then over on this side, it does the same thing. Even if we shrink it down a little bit, look at that.

**Aaron Francis:** It's wrapping, and then, boop, it goes away when we run out of space, but this one still, uh, wraps all the way around that image and then floats down there if we need to. So I'm redesigning my site. Uh, my, my existing site is very good. I like it very much, but there's too much stuff on here. All of this is not being highlighted well enough, and so I'm redesigning it in more of a, uh, like, a magazine or a newspaper layout.

**Aaron Francis:** And I think this is very cool. I'm very happy with this so far, but that's not what this is about. It's about this right here. So when I was looking for design inspiration, I started looking on Pinterest for newspaper and magazines, and I came across this. And I thought, "Oh, that's pretty cool. I really like that." Like, look at that. Mine is not quite as tight as theirs, um, but this is super cool and exactly what I wanted to do, so I went down the rabbit hole to figure it out.

**Aaron Francis:** And what I found is a CSS property that I did not know about called shape-outside. It is a widely supported property, IE doesn't support it or might not support it. Who knows? Who freaking cares? Uh, MDN says it is widely available. So the shape-outside property, what it does is it allows you to define a different shape, instead of a box, a different shape.

**Aaron Francis:** In our case, it's gonna be a polygon. So if we look back here at the docks, we'll see you can do a circle, and you see the little circle there, ellipsis, mm, not, not that different. Shape-outside URL, shared assets, round balloon. You can use the alpha layer of a PNG to get this shape. This, this does work.

**Aaron Francis:** This is more finicky than what we're gonna do, which is the polygon. So we're gonna define a polygon with percentage-based measurements instead of pixel-based measurements. That way, when our image scales up and down, everything still works just fine. All right. We're gonna start from the very beginning. I've rolled it all back so that we can build it together.

**Aaron Francis:** What we have is, uh, this first image and then the second image and then the text all down here. So it looks pretty bad, but we're gonna build it up together. Here is the layout. We have, uh, the soccer image first, so me and, uh, my son right there. We have the soccer image first, and then we have the stage image. So that's me on stage over here.

**Aaron Francis:** Gotta show people, you know, gotta show I'm a family man, but I'm also very professional. So we got those two images. And then we have the slot. And this is a Vue.js project, so from the outside world, we can pass in, uh, all of the content. And I believe that is in magazine about. There we go. So here's the magazine wrap, uh, component, which is what we were just looking at, and this is the content that we're gonna pass in the middle, all of this text here that says who I am and what I do, and that shows

**Aaron Francis:** up down here. So the first thing that we need to do, and this is actually very important with shape-outside, is shape-outside only works with floated elements, which, you know, we, we don't really do floats that much anymore. Thanks to Flexbox and Grid, we, we don't float very much. But for shape-outside, you must float. So we're gonna float soccer to the left, and we're gonna float the stage picture to the right, and then hopefully, the content will end up in the middle.

**Aaron Francis:** We're just gonna start with some Tailwind. I do have proper class names on there, so I've got soccer image and stage image. But if we look down here at the bottom, they're both empty. That... We will build some stuff up down there, uh, some stuff that's too complicated to use, uh, Tailwind's arbitrary stuff. But let's start with this. We're gonna do float left, and that should pull, that should pull...

**Aaron Francis:** Where are we? Um, there you go. So now we have both images right beside each other, which is not what we want, but we are getting closer. And we're gonna s- take the stage image and float that to the right. Look at that. Now we are talking. So we floated both images out, and now the content ends up in the middle. But you'll see it does have a straight edge, and that is because if we put a, uh, if we put a border on this guy, you'll see that is the box.

**Aaron Francis:** That is the margin. That is the outside shape. That's the margin box, as they call it. So that's a problem. That's not what we're after. And if we add it on the stage image as well, you'll see that is the box there. Now, what we need to do is we need to figure out how are we going to define the polygon. I would like to be able to do it visually.

**Aaron Francis:** I'm not gonna type in a bunch of numbers. Good news, we can do it visually thanks to some very kind person on the Internet. We love the Internet. Look at this, CSS Clip Path Generator. That's pretty good. So what we're looking for is we need to go to images, and then I think it's maybe, uh, maybe in the about folder, there's a soccer.

**Aaron Francis:** There we go. And of course, my son's face is covered up because it's the Internet. I don't know you people. All right. So we load this up, and then we get to start clicking and dragging. I'm gonna move that up there and that right there, and then it's just a little bit... I don't want to snap. It's just a little bit finicky. I'm not gonna make you watch all this, so please don't leave.

**Aaron Francis:** Um, but you can just click and drag and add the points, and what comes out... We'll just make it whoop and whoop. What comes out at the end is, look at that, clip-path polygon. Now, we're not actually gonna use clip-path, although that would work, but my image already has transparency, so I'm not trying to clip off part of the image.

**Aaron Francis:** What I'm trying to do is create the shape-outside path. So let's, um, sure, let's pull this in so we can see how, uh, rather that this is working, and we're gonna copy that guy and come back. Um, I will leave a link to this tool down below. It's at unusedcss.com, so thank you to them for all their hard work, and we're gonna put that in soccer image right there.

**Aaron Francis:** And if we were to... Where are we? Refresh. That is what a clip path does. That's kinda cool. Um, but it's not useful for what I'm doing. Like I said, I already have the transparency. Um, Chrome is not rendering it transparent, but I already have the transparency on my image. I just went into Photoshop, and I, you know, clipped it all out. So I don't want clip path.

**Aaron Francis:** What I do want is shape outside. There we go. Look at that. So you'll see we still have, uh... We still have the image border. So we haven't actually changed the shape of the image, but what we're communicating to, uh, the browser is, "Hey, use... Instead of using that hard right edge, use this polygon that I passed in." And the polygon is, um, based on percentages because this image is ginormous.

**Aaron Francis:** Look how big this is. That... I actually need to shrink that down. There's no sense, there's no sense in sending that down to the client. Um, but because it's based on percentages, this works even when resizing. I think we have a couple different res- there we go. There's a responsive size. So you see it, it gets smaller, but the path is still correct. We don't get any overlapping in the part where we actually did the path correctly.

**Aaron Francis:** So that works quite nicely, and I do have, uh... I do have this polygon saved, so we're gonna just put the real one in right there, and look at that. Now, we have this nice little edge going on, and let's remove the borders 'cause that was for demonstration, and we don't need that anymore.

**Aaron Francis:** That looks pretty good to me. You can add, um... You can add a... Let's see. Uh, I think it is shape margin, and you can add, like, let's say one rem. That feels probably, that feels probably too big. Um, so you see this gap is getting bigger. So depending on how you draw your polygon, you can draw it super tight so it's real accurate, but then y- maybe you don't want your text ramming right up against the image.

**Aaron Francis:** So you can draw it super tight, and then you can add a shape margin that says, "Hey, this is the shape. Move out a little bit. Give me a little bit of space," and that's what we've done here. I'm gonna drop this back down to just a little bit because I did draw the polygon. I drew the polygon a little bit wide, so I don't need a ton of margin. Now, what we haven't done is we haven't done the stage image over here, and this, if we open this in a new tab, you'll see it's the exact same thing.

**Aaron Francis:** It's just, um, I've cut it out in Photoshop, and then I went into whatever it was called, the very useful people, unusedcss.com. I went in there, and, um, I added a clip path which I have saved, so you don't have to watch me do that. So we're gonna add the shape outside right there, and this will allow us to have that wrapping or, um, that text go super close over to my head.

**Aaron Francis:** And you see I drew that one a little tighter. So look, it's just a little... Yeah, I don't like that a whole lot, so we're gonna add a little bit bigger. Uh, let's just see what one rem looks like. That feels better. Maybe even... No, that feels good. So now we have both shapes working together to make this text be constrained.

**Aaron Francis:** And then, um, because you do run out of room somewhat quickly with the two images side by side, I've opted to save the family image, family first, and hide the, uh, stage image once we get below a large screen. So I'm just using traditional Tailwind for that. So it becomes hidden once it gets too small.

**Aaron Francis:** There we go. And we still have that, uh, that, uh, shape outline over here, and then it does wrap below which, ah, who can say? I don't know. I think it looks fine. Um, I think it looks much better when it's like this, but I, I don't mind that wrapping down below, especially when it gets to be quite a bit smaller.

**Aaron Francis:** It starts to make a lot more sense. Nice little outline, and then take up the full... If you're on mobile, for example, take up the full width to show all the text. I'm super pumped with the way this effect is turning out. I am going for that more magazine print style. Here is another example of, uh, that polygon in print, and you can see they, uh, they have text justify on theirs, and so it looks a lot cleaner, right?

**Aaron Francis:** Mine is a little bit wonky. Theirs is super rigid and clean, which you can do more easily in print, frankly, with, you know, resizing of browsers. That makes it a little bit harder, but I like pulling some of these print ideas out. Let me know what you think. If you've seen this effect somewhere and you, you have a good example of it, please comment below. I'll leave a bunch of links down below where you can learn more.

**Aaron Francis:** And this video is sponsored by me. This video is sponsored by me. If you wanna learn how to make videos like this, you can go to screencasting.com where I teach an entire course on it. And just for you, if you use the code YouTube, you can get 20% off any of the courses over there. So please go check it out. Thank you for all your support.

**Aaron Francis:** Until the next time, see ya.

---

## Related on aaronfrancis.com

- [I transformed my personal site into a magazine-style layout](/videos/i-transformed-my-personal-site-into-a-magazine-style-layout) *(Video · 2025-07-16 · shared: magazine layout, text wrapping, floats)*
- [Colophon](/about/colophon) *(Page · 2026-11-25 · shared: web design)*
- [Should You Learn Tailwind Before CSS? w/ Bree Hall](/podcast/should-you-learn-tailwind-before-css-w-bree-hall-6d034376) *(Podcast · 2025-05-22 · shared: css)*
- [Yii and the asset pipeline: part 2](/writing/yii-and-the-asset-pipeline-part-2) *(Article · 2013-06-19 · shared: css)*

## Relevant Resources from Aaron Francis

- **[Solo](https://soloterm.com)** (overview on site: [/software](/software)): All-in-one agentic development platform and terminal workspace built by Aaron Francis for orchestrating processes and AI coding agents.

## Search aaronfrancis.com (2-Hop Static Keyword Index)

Pick the alphabetical shard matching any topic to find exact pages across all articles, newsletters, videos, talks, and podcast transcripts (every shard is < 40 KB):
[A-B](/llms/keywords/a-b.txt) · [C](/llms/keywords/c.txt) · [D-E](/llms/keywords/d-e.txt) · [F-G](/llms/keywords/f-g.txt) · [H-J](/llms/keywords/h-j.txt) · [K-L](/llms/keywords/k-l.txt) · [M-N](/llms/keywords/m-n.txt) · [O-P](/llms/keywords/o-p.txt) · [Q-R](/llms/keywords/q-r.txt) · [S](/llms/keywords/s.txt) · [T-Z](/llms/keywords/t-z.txt) · [Directory](/llms/keywords.txt) · [Site Map](/llms.txt)

Shards for this page's topics: `shape-outside` ([S](/llms/keywords/s.txt)), `css` ([C](/llms/keywords/c.txt)), `magazine layout` ([M-N](/llms/keywords/m-n.txt)), `floats` ([F-G](/llms/keywords/f-g.txt)).

## About Aaron Francis (Current Context)

Aaron Francis is VP of Marketing and Community at [Laravel](https://laravel.com), founder of [Try Hard Studios](https://tryhardstudios.com), creator of [Solo](https://soloterm.com), co-host of [Mostly Technical](/podcast), and author of [Mastering Postgres](/courses), [High Performance SQLite](/courses), [MySQL for Developers](/courses), and [Screencasting.com](/courses). Full bio: [/about](/about) · Current focus: [/now](/now).
