new course
CSS grid landing page tutorial (36min)

Lesson info

Lesson info

Elements can pass typographic style information down to their children. You can set text styles on parent elements, which will cascade down, and you can override these styles on their child elements.

It’s common to use this technique to set global font styles on the Body tag, to align text and other elements inside sections, and to override default link block styles. In this video, we'll show you three examples of how text style cascading works:

  1. ‍Style cascading from the body tag
  2. ‍Style cascading from the section element
  3. ‍Style cascading from the link block
Clone this projectDownload project assetsDownload lesson assets

Transcript

Columns help us place...and organize content side-by-side; horizontally.

And they function exactly as you'd expect: each column is self-contained, and the columns are organized into a row. That row contains all our columns.

And the process for setting up columns is simple. And it's literally two steps: select a layout, and add your content.

For layout, let's drop a Columns element right into our project. After we add the columns, we can select the layout option, and you'll see the layout change right on the Canvas.

As you explore the different options, the structure is also being reflected under Customize. Right underneath. That's because the width of our columns can be flexibly sized. We can manually adjust the size. And those numbers? They just show the proportions. Always adding up to 12. So you can really get in and customize the layout precisely how you want to.

And for now, we'll go with three-across. We can always change this later.

And that's selecting a layout. You can stop here, but you shouldn't. Because your columns are empty.

So let's move on...to content.

And all we have to do is drop content right into the columns. Now a lot of this content — the existing content — was simply living inside the container. And all we're doing? Is moving that content — this text and these images — we're moving it right into our columns.

By default, columns are going to have a small amount of padding on the sides, but we can adjust that, too. We'll simply set our padding — adjust our padding on the sides? Holding down option or alt to adjust both sides at once.

And once we've done that on this column, we can double click and name our class since we intend to reuse it. We can name it whatever we want. And that way we can reuse it on the other columns.

So if we select the next column, we can apply that class again. And as we do that — as we apply that class to the other columns here — you can see the padding update. These columns are inheriting that padding from our Feature Column class. And if we change one of them? It will change all the columns using the Feature Column class.

Now we can go into our element settings at any time and make an adjustment. So if we want to resize our content, or even add or remove columns, we can do that here, too.

We can also make changes to how our columns are displayed on various browser widths like tablet device widths or phones. This lets us customize the columns layout so it can more effectively adapt to different screens.

And that's it! For columns, we select a layout, and then we add content.