Jump to content

reduce number of grid blocks per row for specified width range

Recommended Posts

Site URL: https://www.frjohnharvey.com/featured-articles

Hello - I'd be grateful for some guidance.  🙂  I've added a page to my site which has four grid blocks per row when viewed on a desktop - that's fine.  When viewed on a phone, there's just one block per row and that's fine too.

What I'd like to do is add custom css (I'm on a personal plan) which shows only two blocks per row when the page is viewed on devices that have a minimum width of 768 px and a maximum width of 1024 px.

I've tried following some of the coding already provided in these forums, but I must be doing something wrong, because I can't get it to work.

Thank you in advance!

Link to comment
13 minutes ago, 7TK said:

Site URL: https://www.frjohnharvey.com/featured-articles

Hello - I'd be grateful for some guidance.  🙂  I've added a page to my site which has four grid blocks per row when viewed on a desktop - that's fine.  When viewed on a phone, there's just one block per row and that's fine too.

What I'd like to do is add custom css (I'm on a personal plan) which shows only two blocks per row when the page is viewed on devices that have a minimum width of 768 px and a maximum width of 1024 px.

I've tried following some of the coding already provided in these forums, but I must be doing something wrong, because I can't get it to work.

Thank you in advance!

Hi, i just write a code for your request. please apply it on your CSS editor
@media (min-width:751px) and (max-width:1024px) {
    .blog-basic-grid {
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    }
}

Link to comment
2 hours ago, Agha_Waqas said:

Hi, i just write a code for your request. please apply it on your CSS editor
@media (min-width:751px) and (max-width:1024px) {
    .blog-basic-grid {
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    }
}

Thank you so much!! 👍😀  That worked so easily! (I wish I'd asked for help hours ago...)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.