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 helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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

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.