You've designed a section that looks beautiful on desktop. Then you check it on your phone, and it's a mess: an image that's too wide, text that goes on forever, or a layout that just doesn't translate to a small screen.
Sometimes the best fix isn't forcing one section to work everywhere. It's showing one version on desktop and a different one on mobile. Squarespace doesn't have a built-in button for that, but with a few lines of CSS, you can hide any section on mobile, on desktop, or everywhere. Here's exactly how.
Why You Might Want to Hide a Section
There are plenty of good reasons. A wide gallery or detailed graphic might look stunning on a laptop but turn tiny and unreadable on a phone. A long block of text that feels fine on desktop can feel endless when someone is scrolling with their thumb. Or you might want a different hero image on mobile that's cropped specifically for a vertical screen.
Hiding sections is also handy for things that are temporary, like a holiday promotion or a section you're still working on that isn't ready for visitors yet.
Does Squarespace Have a Built-In Way to Hide Sections?
Not for whole sections. In Squarespace 7.1, you can use device view to arrange blocks in Fluid Engine sections differently on mobile than on desktop, and you can hide specific elements, but there isn't a setting to hide an entire section on just one device.
The reliable solution is custom CSS. It sounds technical, but you'll only need to copy, paste, and swap in one ID. This guide is for Squarespace 7.1, which most current sites use. One heads-up: Squarespace's support team doesn't troubleshoot custom code, so test your changes carefully and keep a note of what you've added.
Step 1: Find Your Section ID
Every section on your site has its own unique ID, and that's how you tell Squarespace which section to hide. The easiest way to find it is the free Squarespace ID Finder extension for Chrome. Install it, open your live site, turn on the extension, and click the section ID that appears on the section you want to hide to copy it.
If you'd rather skip the extension, right-click the section on your live site in chrome, choose Inspect, and look for the section tag with a data-section-id value. That long string of letters and numbers is your ID. You’ll have to sift through the code for this one so trust me on the extension :)
Step 2: Add the CSS
Open your Custom CSS panel (you'll find it under Design, or under Website Tools in newer dashboards), paste in the snippet you need, and replace YOUR-SECTION-ID with the ID you copied. Save, then check your site on both desktop and your phone.
Hide a Section on Mobile
@media screen and (max-width: 767px) {
section[data-section-id="YOUR-SECTION-ID"] {
display: none !important;
}
}
Hide a Section on Desktop
@media screen and (min-width: 768px) {
section[data-section-id="YOUR-SECTION-ID"] {
display: none !important;
}
}
Hide a Section Everywhere
Useful for a seasonal section you want to keep for later, or a section you're still building on a live page.
section[data-section-id="YOUR-SECTION-ID"] {
display: none !important;
}
Want to hide more than one section at once? List each selector inside the same snippet, separated by commas.
How to Swap a Section Between Mobile and Desktop
This is where hiding sections really shines. Build two versions of the same section, one designed for desktop and one designed for mobile, and place them next to each other on the page. Then use the mobile snippet to hide the desktop version on phones, and the desktop snippet to hide the mobile version on larger screens. Visitors only ever see the version made for their device.
A Few Things to Keep in Mind
Hiding a section with CSS doesn't remove it from your page. It's still part of your site's code, which means search engines can still see it. That's fine for a desktop and mobile version of the same content, but hidden sections shouldn't be used to stuff in extra keywords. If you're curious how this fits into the bigger picture, our post on whether Squarespace is good for SEO covers what actually helps your site rank.
Hidden sections can also still affect how quickly your page loads, especially if they contain large images, so keep them lean. And leave yourself a note in your CSS, like / hides old hero on mobile /, so future you knows what each snippet does.
If you're hiding a section because you're still working on it, and it's more than one section, you may be better off keeping the whole site or page hidden while you build. Our guide to hiding your Squarespace site while you work on it walks through those options.
Want Help Getting Your Site Just Right?
If you've got a list of little Squarespace fixes like this and would rather not tackle them alone, a Squarespace Speed Session is a focused, one-on-one session where we work through them together.
Frequently Asked Questions
-
Not natively. Squarespace 7.1 doesn't include a hide option for sections, so CSS is the most reliable method. Some third-party plugins offer a visual way to do it if you'd rather avoid code.
-
Not when it's used for its intended purpose, like showing different layouts on mobile and desktop. Just avoid using hidden sections to add content or keywords visitors can't see.
-
Yes! This can natively be done in Squarespace now hooray! The same CSS approach also works with block IDs though, which you can also find with the Squarespace ID Finder extension. Swap the section selector for the block's ID in the snippet.
-
Double-check that you copied the full section ID with no extra spaces, that the quotation marks are straight rather than curly, and that you saved your CSS. Then check your live site in a private browser window, since your logged-in view can look different.
A Squarespace Site Built to Be Found
Every Jaks Digital website launches with the SEO foundations already in place, from page titles and descriptions to structure, speed, and redirects, so your site is ready to show up from day one. If you're planning a new site for the year ahead, let's talk.