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:

  1. This article covers the default preset, Grid - Image - Standard.
  2. CSS Grid may not be fully supported in IE. I have not tested this solution in IE or Edge. See the support here.
  3. 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:

  1. Beautiful, minimal and progressive CSS.
  2. 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 (one-time payment for lifetime access).

Already a member? Log in below or here.

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

For adding code blocks wrap the code in three backticks. Markdown should work.
Provide a URL of your site/webpage if something is not working.
>
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: