Flexbox for noobs


Making a CSS block grid is super easy with Flexbox. Check out this basic example I made.

All you need to do is add the following lines of CSS:

ul {
  display: flex;
  flex-wrap: wrap;
}

li {
  width: 25% //This makes 4 columns per row. Adjust to taste
  //flex-basis: 25% also works as well
}

If you want all the grid items to have the same height, add "display: flex" to each of the list items.

Comments

Popular posts from this blog

Symlinking

Docker for noobs