Site logo

Archived topic

Margin in mobile category and archives boxes

1 reply · Started by Albert on June 2, 2022

Viewing posts 1–2 of 2

Hi, I have GeneratePress configured to display 4 columns of posts on the archive and category pages (desktop version) and 2 columns on the mobile version. I would like to know how I can do so that in the mobile version there is a margin between the boxes, in the same way as in the desktop version.

An example page would be:
https://viajar.amsterdam/visitar/

Thank you!

Hi there,

try this CSS:

@media(max-width: 768px) {
    .generate-columns-container .post.generate-columns {
        width: calc( 50% - 10px );
        margin: 5px;
    }
}
This archived topic is closed to new replies.