CSS Grid Properties

CSS Grid Properties

The use of grid layout is one of the main web design methodologies. Plenty of tools help Front-End Developers build grid-based websites (for instance Bootstrap, Foundation and etc.,)

Here you are get the basic of Grid system. The properties and basic example.

Basic Grid Code

HTML :
<div class="wrapper">
        <div class="one">One</div>
        <div class="two">Two</div>
        <div class="three">Three</div>
        <div class="four">Four</div>
        <div class="five">Five</div>
        <div class="six">Six</div>
</div>
CSS:
.wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 10px;
  grid-auto-rows: minmax(100px, auto);
}
.one {
  grid-column: 1 / 3;
  grid-row: 1;
  background-color: chocolate;
}
.two { 
  grid-column: 2 / 4;
  grid-row: 1 / 3;
  background-color: cornflowerblue;
}
.three {
  grid-column: 1;
  grid-row: 2 / 5;
  background-color: cyan;
}
.four {
  grid-column: 3;
  grid-row: 3;
  background-color: darkkhaki;
}
.five {
  grid-column: 2;
  grid-row: 4;
  background-color: darksalmon;
}
.six {
  grid-column: 3;
  grid-row: 4;
  background-color: darkseagreen;
}
Output :

Grid Properties :

clip-path makes it easy to clip-out basic shapes using either of the polygon, ellipse, circle or inset keywords, which are part of the CSS exclusion module.

  • grid-template-columns
  • grid-template-rows
  • grid-template-areas
  • grid-template
  • grid-auto-columns
  • grid-auto-rows
  • grid-auto-flow
  • grid
  • grid-row-start
  • grid-column-start
  • grid-row-end
  • grid-column-end
  • grid-row
  • grid-column
  • grid-area
  • row-gap
  • column-gap
  • gap

You May Also Like

SASS

CSS Grid Example

Image Responsive

Angular Components

Leave a Reply

Your email address will not be published. Required fields are marked *