This is intro to CSS grid layout part 5. So far we have taken a look at following topics. It is recommended to take a look if you are not familiar with css grid layout basics. basic concepts fractional units grid item positioning grid item positioning based on line names In this post, I will focus on explaining how to use grid area with area names for positioning grid items with an example. Let’s take a look it. Example We have a layout of multiple items. Note that the header is not spanning to the end but the last slot READ MORE
Tag: CSS grid layout
Intro to CSS Grid Layout Part 4
This is intro to CSS grid layout part 4 continuing from previous posts. This will specifically focus on how to position grid items based on the name of the grid lines. If you are not familiar with CSS grid layout, please refer to these posts here. basic concepts fractional units grid item positioning In the previous post, we went over how to position grid items based on their grid line numbers. However, it is often hard to read and understand the code when it’s using line numbers. To improve the readability and maintainability, we want to use names for the READ MORE
Intro to CSS Grid Layout Part 3
This is a continuation of intro to css grid layout articles. Please refer to previous articles for declaring grid layout and fractional units in row/column. This post will specifically focus on the positioning and spanning of the grid item. Let’s take a look at the example image and code first. Example HTML Code As you see in the above image and the HTML code, each item is placed in the order of declaration which is the default positioning of the CSS grid layout. Then, you might ask a question if it’s possible to place an item to a specific location. READ MORE
Intro to CSS Grid Layout Part 2
This is intro to css grid layout part 2, continuing from the first post which explained basics of CSS grid layout. This post will explain fractional units which control the width of each grid item. Example CSS Grid Layout Example HTML Code This is the html code used for the example images in the post. Example CSS Code This is the common CSS code used for the example images. I will specify more properties separately when necessary. For more explanations about rows, columns and gap properties, please take a look at the first post. Fractional Units We have defined a READ MORE
Intro to CSS Grid Layout Part 1
This post is an intro to CSS grid layout part 1. You can use CSS Grid to easily build a two-dimensional grid-based layout. This is the first part of the article which will specifically focus on the basic properties. CSS Grid Layout Example The above image represents basics of CSS grid layout. It has two rows and three columns. Each brown box is called a grid item. There is a gap between the items which is called a gutter. Grid Container It is the container of the grid. You can declare the container by calling this in the CSS file. READ MORE