From the course: Responsive Layout

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Placing grid items

Placing grid items - HTML Tutorial

From the course: Responsive Layout

Start my 1-month free trial

Placing grid items

- [Instructor] Next, we're going to look at how to move items around in the grid. They don't have to be displayed in the order they are in the HTML and they don't always have to take up only one cell in the grid. In the code, you can see that I've already defined three columns and two rows. We can place grid items directly into grid cells, but we need a way to specify the location we want. This is done through the grid line numbers. From the dev tools, you can see the line numbers. The vertical lines, you'll see the line numbers at the top, one, two, three, four. And the horizontal lines numbered on the left are one, two, three, four, five. You can also see there's negative numbers on the bottom and right side. These can be used to place grid items as well and they're handy if you want to count from the last grid line, but you don't know its number or the number may vary. So down on the bottom, we see negative one, negative two, negative three, and negative four. Now, on the right, we…

Contents