Creates x columns of 200px width
- Set the blog/portfolio module design to fullwidth
- Give the module a custom class hws-posttype-css-grid
- Gap: 20px; = same gap between items all sided
- Gap: 20px 50px; = different gap between rows and columns
/** START post type with css grid **/
/* create css grid column template */
.hws-posttype-css-grid > div {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
gap: 16px;
}
/* remove pagination from blog grid with absolute position */
.hws-posttype-css-grid.et_pb_posts > div > div,
.hws-posttype-css-grid .pagination {
width: 100%;
position: absolute;
bottom: 0;
transform: translate(0%, 150%);
}
/** END post type module with css grid **/Code language: CSS (css)