new course
CSS grid landing page tutorial (36min)

Lesson info

Lesson info

Webflow's style panel gives you several layout methods to help you position content in your project. In this video, we'll give you a brief overview of some of the common CSS layout and positioning options available.

Explore this project

Want to dig into the project featured in this video and see how everything is put together? We've included the full project we used when making this lesson, and we've shared the link right under this very paragraph.

View and clone this projectDownload lesson assets
Clone this projectDownload project assets


This video lesson is an overview of some of the major layout controls on the Style Panel. As we know, in CSS, styles can be used to control layout.

And sometimes there are multiple ways to do things — to create what looks and even functions the same way — so it's helpful for us to have a good overview.

We'll touch on display settings like block, inline block, inline, and flex. Then we'll talk padding and margin, float, overflow, positioning, and finally: transforms.

We've created detailed content on each of these, so what you're about to see is a quick, top-level overview of these layout controls.

So. Let's do display settings like block elements. Block elements, like headings and paragraphs by default — they stack on top of each other. They don't wrap, and their boundaries take up the full width of their parent element, unless we set custom dimensions.

With inline block, elements are only as wide as the content inside. Elements sit next to each other on the same line, and when they hit the inner boundary of their parent? They wrap to the next line.

Inline elements behave just like text. Text spans or text links are good examples of this — they ignore set dimensions but they'll take into account typography values (like font size).

Flexbox is a super powerful layout tool. That's actually how it's described in the official spec. Except it isn't. We doctored this image. Flexbox lets us align and size or stretch and organize items inside a container.

Up next. Padding and margin. These controls let us create breathing room inside (for padding) or outside (for margin) of an element's boundary.

Then there are floats. When something's set to float, text will wrap around it.

Then we have overflow, which gives us control over whether content inside an element is allowed to spill outside the element's boundaries.

We have positioning, which affects how elements are positioned relative to themselves. Auto (or Static) respects the normal flow of content, relative lets us move something around without affecting other elements, absolute lets us position something around its parent element, and fixed lets us position something around the viewport. Great for persistent navigation. Or wonderful popup ads.

And finally, transform. This lets us move, or rotate, or scale, or skew content.

Like we said at the beginning, this is a quick crash course on many of our layout options. We've created detailed content for each of these — but this serves as a brief overview to get started or brush up on some of these CSS layout properties.