This members-only tutorial provides the steps to replace Flexbox with CSS Grid for styling Oxygen's Easy Posts grid output without using media queries.
Note:
- This article covers the default preset, Grid - Image - Standard.
- CSS Grid may not be fully supported in IE. I have not tested this solution in IE or Edge. See the support here.
- The out of the box break points for Easy Posts are 1120px and 768px where the posts get 50% and 100% width respectively. With the solution in this tutorial, it is going to be 1119px and 759px. These will of course dynamically change depending on the (horizontal) grid-gap and padding values we are going to set for
.oxy-posts
.
Advantages of this method:
- Beautiful, minimal and progressive CSS.
- Solves this problem gracefully.
Step 1
Easy Posts > Templates > Template CSS.
Replace
%%EPID%% .oxy-posts {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
%%EPID%% .oxy-post {
display: flex;
flex-direction: column;
text-align: left;
align-items: flex-start;
margin-bottom: 3em;
width: 33.33%;
padding: 1em;
}
with
This is a premium members-only content.
To view the rest of the content, please sign up for membership ($47/month or $599 one-time).
Already a member? Log in below or here.