Jump to content

Blog columns mobile breakpoint

Recommended Posts

Site URL: https://www.ukrainiandanceworld.com/dance-groups-test1234

Hi there,

I have multiple blog pages on my website and they already have custom CSS. In this example I have a blog page where i have expanded the columns to 8 on desktop but on the mobile breakpoint I would ideally like 2 or 3 columns. Below CSS doesnt seem to be working and is still presenting one column in mobile?

Any help woud be appreciated

//columns number dance group (new)- desktop
section[data-section-id="6265da30a06e8a480cbe78d2"] 
.blog-basic-grid { grid-template-columns: repeat(8, 1fr) !important;
}

//columns number dance group (new) - mobile
@media only screen and (max-width: 768px) 
{section[data-section-id="6265da30a06e8a480cbe78d2"] 
.blog-basic-grid { grid-template-columns: repeat(3, 1fr) !important;
}
}

 

Screenshot 2022-09-14 at 11.10.27 PM.png

Screenshot 2022-09-14 at 11.10.34 PM.png

Link to comment
5 hours ago, Maksymrewko said:
//columns number dance group (new)- desktop
section[data-section-id="6265da30a06e8a480cbe78d2"] 
.blog-basic-grid { grid-template-columns: repeat(8, 1fr) !important;
}

//columns number dance group (new) - mobile
@media only screen and (max-width: 768px) 
{section[data-section-id="6265da30a06e8a480cbe78d2"] 
.blog-basic-grid { grid-template-columns: repeat(3, 1fr) !important;
}
}

Try this adjustment of your code:

//columns number dance group (new)- desktop
section[data-section-id="6265da30a06e8a480cbe78d2"] .blog-basic-grid { 
  grid-template-columns: repeat(8, 1fr) !important;
}

//columns number dance group (new) - mobile
@media only screen and (max-width:768px) { 
section[data-section-id="6265da30a06e8a480cbe78d2"] #gridThumbs {
    grid-template-columns: 1fr 1fr !important;
 }
}

Please let me know if this works (or not), and upvote if it does!

Please like and upvote if my comments were useful to you. Thanks!

Zygmunt Spray
Squarespace Website Designer
Contact me: https://squarefortytwo.com/ 
🔌Ghost Squarespace Plugins (Referral link)
Buy me a coffee

Link to comment
On 9/16/2022 at 10:36 AM, Maksymrewko said:

thanks for your reply - unfortuantely the code adjustment didnt work.

Try this new code

//columns number dance group (new)- desktop //
section[data-section-id="6265da30a06e8a480cbe78d2"] .blog-basic-grid { 
  grid-template-columns: repeat(8, 1fr) !important;
}

//columns number dance group (new) - mobile //
@media only screen and (max-width:768px) { 
section[data-section-id="6265da30a06e8a480cbe78d2"] #gridThumbs {
    grid-template-columns: 1fr 1fr !important;
 }
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 2 weeks later...
On 9/17/2022 at 11:08 PM, tuanphan said:

Try this new code

//columns number dance group (new)- desktop //
section[data-section-id="6265da30a06e8a480cbe78d2"] .blog-basic-grid { 
  grid-template-columns: repeat(8, 1fr) !important;
}

//columns number dance group (new) - mobile //
@media only screen and (max-width:768px) { 
section[data-section-id="6265da30a06e8a480cbe78d2"] #gridThumbs {
    grid-template-columns: 1fr 1fr !important;
 }
}

 

@tuanphan unfortunalty this code doesn't work. I'm still seeing one column in the mobile breakpoint

Link to comment
13 hours ago, Maksymrewko said:

@tuanphan unfortunalty this code doesn't work. I'm still seeing one column in the mobile breakpoint

The url doesn't exist now. Can you check it again?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.