Jump to content

How can I change the Mobile Breakpoint for particular sections on my page?

Recommended Posts

Hi 🙂 I have some sections on a page of my website that I want to show in mobile view (i.e. stacked) on screen widths of less than 1024px. I have searched the forum, but can't find code that seems to work in my case.

I want to stack the two sections that have 4 columns across (as they become too squashed when the screen gets much below 1024px). Can anyone help me with code?

I have tried the below custom CSS, but it doesn't seem to work:

@media only screen and (max-width:1023px) {
	section[data-section-id="63ff72ad1ff37c208d22c17d"] .col {
    	width: 100% !important;
    	margin-bottom: 10px;
	}
}

The page link is below and it has a password: ebw

https://ebw-global-dev-site.squarespace.com/business-eq-assessment 

Thanks in advance for any help anyone can offer 😄 

Link to comment

I don't know if a particularly good way to natively change the mobile breakpoint to be higher than 768px.

Looking that section on your website, it suffers from a different problem on larger screen and fixing this will slightly help your columns be more even on smaller screens.

image.thumb.png.ef6196710e7a47f9414a4039a9e8a3c7.png

We can fix these uneven columns by making that section full-width with Custom CSS:

section[data-section-id="63ff72ad1ff37c208d22c17d"] {
  .fluid-engine {
    --sqs-site-max-width:100vw;
    --sqs-site-gutter:0vw;
  }
}

Hope that helps!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

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

 Did I help? Buy me a coffee?

Link to comment

Thank you Ziggy, that's really useful to know! I didn't even realise this would be a problem - I'll use that code to fix sections that span the whole width on larger screens.

Shame there is no native way to change the mobile breakpoint to be higher than 768px....

Is there any way to change the layout of the columns using CSS? I might be able to use such code in a media query for particular sections that are too squashed?

Thanks 🙂

Link to comment
7 minutes ago, ClareD said:

Is there any way to change the layout of the columns using CSS

I'm not aware of a good way to do this.

8 minutes ago, ClareD said:

I'll use that code to fix sections that span the whole width on larger screens.

Yes, you have to be careful with extending beyond the 24 columns into the gutter, but it's a very useful feature at times!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

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

 Did I help? Buy me a coffee?

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.