Squarespace does not have a hide button for sections. You can hide individual blocks without code, but to hide a section in Squarespace you have two choices: save it and remove it from the page, or hide it with a short piece of CSS. CSS also lets you hide a section on mobile only, on desktop only, or everywhere while you keep editing it.
This guide covers all of them. The code is checked against the breakpoints Squarespace itself uses, because the most common snippets online use the wrong ones, and that is why so many people find their section still showing on some phones.
Which method do you need?
Pick by what you are trying to do:
| What you want | Method | Code? |
|---|---|---|
| Take a section down for now and bring it back later | Save the section, then delete it | No |
| Hide one block, not the whole section, on mobile or desktop | The Layers panel in Fluid Engine | No |
| Hide a whole section on phones only | CSS with max-width: 767px | Yes |
| Hide a whole section on desktop only | CSS with min-width: 768px | Yes |
| Hide a section from visitors but keep editing it | CSS with the edit-mode selector | Yes |
| Hide a whole page or the whole site | Page or site settings, not CSS | No |
If you only need the last row, you are in the wrong post: how to hide a Squarespace website while you work on it covers the site settings, and password protecting a Squarespace page covers single pages.
How do you hide a section for later without code?
Save it, then delete it. Squarespace’s saved sections feature works like a clipboard that does not expire:
- Open the page and click Edit.
- Hover over the section and click the heart icon to save it.
- Click the trash can icon to remove the section from the page, then save.
- When you want it back, click Add Section, then Saved, and pick it.
You can save up to 250 sections on one site. If you are a Circle partner, as I am, you can also save sections to your account and reuse them on other 7.1 sites.
There are three catches before you rely on this:
- Save first, delete second. Squarespace’s help centre says that after saving the page, a deleted section can’t be restored. If you delete before you click the heart, it is gone.
- Forms lose their storage. Squarespace notes that storage connections in form and newsletter blocks are not carried over to a saved section. When you add it back, reconnect the form to its email, Google Sheet or Mailchimp list before you publish, or the sign-ups go nowhere.
- The IDs change. As Sam Crawford points out, a section added back from your saved sections gets a new section ID and new block IDs. Any custom CSS that targeted the old section stops working.
That third point is why I use the CSS method below for any section that already has custom code attached.
How do you find a section’s ID?
Every section on a Squarespace 7.1 page has its own ID, a long string of letters and numbers. The CSS in this post needs it. There are two ways to get it:
- The Squarespace ID Finder extension for Chrome. Turn it on, and it labels every section in blue with its ID. Click the label to copy it.
- Inspect the page. Right-click inside the section, choose Inspect, and look up the code for a
<section>tag withdata-section-id="...".
I go through both in how to find a block ID in Squarespace.
One detail matters more than it looks. In 7.1 the ID sits in an attribute called data-section-id, not in a normal id. I checked the page code of three live 7.1 sites to be sure. So the selector has to be written like this:
[data-section-id="64f1a2b3c4d5e6f7a8b9c0d1"]
and not as #64f1a2b3c4d5e6f7a8b9c0d1. The # version is in at least one tutorial on page one of Google, and it matches nothing.
How do you hide a section on mobile only?
Go to Website, then Website Tools, then Custom CSS, paste this, replace the ID with yours and save:

/* Hide this section on phones */
@media screen and (max-width: 767px) {
[data-section-id="YOUR-SECTION-ID"] {
display: none !important;
}
}
Then check it on a real phone, not only in the editor’s mobile preview.
How do you hide a section on desktop only?
Same place, same idea, the other breakpoint:
/* Hide this section on tablets and desktops */
@media screen and (min-width: 768px) {
[data-section-id="YOUR-SECTION-ID"] {
display: none !important;
}
}
Why 767px and 768px, and not 640px?
Because 767px is where Squarespace itself switches to the mobile layout. The Fluid Engine grid CSS on live 7.1 sites uses max-width: 767px for the mobile layout and min-width: 768px for the desktop layout. Your hide rule should switch at exactly the same point as the layout does.
Several popular tutorials use 640px instead. That leaves a gap: on any screen between 641px and 767px wide, which covers large phones and small tablets, Squarespace shows its mobile layout but your “mobile” section is not hidden. The section you designed for desktop turns up squeezed into the mobile layout. Another tutorial pairs max-width: 767px with min-width: 767px, and at exactly 767px both rules apply and both sections disappear.
Using 767 for one rule and 768 for the other means every screen width gets exactly one of the two.
How do you show a different section on mobile and desktop?
This is the most useful version of the trick, and the reason most people search for it. Some sections look great on a laptop and fall apart on a phone, like a wide image with text placed over one side. Rather than fight the mobile layout, build two sections, one designed for each, and hide each one where it does not belong:
/* Desktop version: hide on phones */
@media screen and (max-width: 767px) {
[data-section-id="DESKTOP-SECTION-ID"] {
display: none !important;
}
}
/* Mobile version: hide on tablets and desktops */
@media screen and (min-width: 768px) {
[data-section-id="MOBILE-SECTION-ID"] {
display: none !important;
}
}
I would only do this for one or two sections on a page. Every duplicate is content you now have to update twice: change a price in the desktop section and forget the mobile one, and phone visitors see the old price. Squarespace’s help centre confirms that edits to a block’s content apply to both layouts, which is exactly what you give up when you split a section in two.
How do you hide a section everywhere but keep editing it?
A plain display: none with no media query hides the section from everyone, including you in the editor, which makes it hard to work on. Squarespace adds a class called sqs-edit-mode-active to the page body while you are editing, as Will Myers explains. You can use it to hide the section only when you are not editing:
/* Hidden from visitors, still visible in the editor */
body:not(.sqs-edit-mode-active) [data-section-id="YOUR-SECTION-ID"] {
display: none !important;
}
I use this for a section that is still being written, such as a new offer or a seasonal banner. It stays on the page where it belongs, you can edit it in place, and when it is ready you delete the snippet.
Can you hide a section on one page only?
You do not need to, because a section ID only exists on one page. The CSS above affects that one section and nothing else, even though it sits in the site-wide Custom CSS panel.
If you prefer to keep the code with the page, you can paste it into the page’s own settings instead: page settings, Advanced, Page Header Code Injection, wrapped in <style> and </style> tags. Two notes from Squarespace’s code injection guide and Will Myers’ article:
- Code injection is only available on the Core, Plus and Advanced plans.
- Keep the selectors flat, as in the snippets above. Nested CSS works in the Custom CSS panel but not in code injection.
I keep everything in Custom CSS with a comment above each snippet saying what it hides. Six months later, that comment is the only way anyone knows why a section has vanished.
Can you hide just one block instead of the whole section?
Yes, and you do not need code for it. Squarespace added a built-in way to hide blocks at specific browser sizes in Fluid Engine sections:
- Switch to the mobile view, or resize your browser to the size you want to hide the block at.
- Click Edit, then the Layers icon at the top left of the section.
- Click the eye icon next to the block. It disappears at that size and shows dimmed in the list.
Squarespace notes that there is no automatic way to hide a block at all browser sizes, and that you can only hide blocks at sizes your own screen can show. For a block on every screen size, the CSS route still applies, using the block ID instead: my Squarespace CSS cheat sheet has the block version of the mobile snippet.
What does hiding a section not do?
It does not remove anything. display: none, according to MDN, turns off the display of an element so the page is laid out as though it did not exist. The section’s text, links and images are all still in the page’s code, which means:
- It is not private. Anyone who views the page source can read a hidden section. Never use CSS to hide prices you have not announced, a client’s details or anything confidential. Disable the page or put a password on it instead.
- It does not speed the page up. The section’s HTML is still sent with the page. If a heavy section is slowing your site, remove it.
- Google still receives it. The text is in the HTML, so search engines can read it. Do not rely on hiding to keep something out of Google.
For a page you are rebuilding, I would not hide sections at all. Duplicate the page or the site, work on the copy, and swap it in when it is ready.
Why is my hide-section code not working?
Almost always one of these, in the order I would check them:
- The selector uses
#. In 7.1 it has to be[data-section-id="..."]. - The quotes are curly. Code copied from some blogs, or typed in a notes app, comes with curly quotes around the ID. CSS needs straight quotes. Delete them and type them again in the CSS panel.
- The ID is old. If you deleted the section and added it back from your saved sections, it has a new ID. Look it up again.
- The breakpoint is 640px. Switch to 767px and 768px as above.
- The section is a collection section. Blog, store and similar collection sections behave differently: Squarespace says they cannot even be deleted, only the collection page can. Hide the specific element inside it instead.
- You are on version 7.0. These selectors are for 7.1 sections. On 7.0, the page structure is different.
If none of those fixes it, my Squarespace tips post has the five CSS snippets I use most on client sites.
Frequently asked questions
Save the section with the heart icon, then delete it from the page; add it back later from Add Section, Saved. To hide only part of a section without code, use the Layers panel to hide individual blocks on mobile or desktop.
Yes, but not with a button. Either save the section with the heart icon and delete it from the page, or hide it with CSS using its data-section-id. CSS also lets you hide it on mobile or desktop only.
Add a media query for max-width: 767px in Website, Website Tools, Custom CSS, targeting [data-section-id="YOUR-ID"] with display: none !important;. 767px matches the point where Squarespace switches to its mobile layout.
Click Edit, hover over the section and click the trash can icon. Once you save the page, it cannot be restored, so click the heart icon to save a copy first if you might want it back.
It is probably a collection section, such as a blog or store section. Squarespace does not let you delete those; you delete the collection page instead, or hide the section with CSS.
In a Fluid Engine section, switch to mobile view and move, resize or hide blocks there; that only changes the mobile layout. Changing the content of a block, such as its text, changes both. For a completely different mobile design, build a second section and use the paired CSS in this post.
Not in itself, but it does not hide anything from Google either, because the text is still in the page's HTML. If you want content out of search results, use a page password or the page's own SEO settings, not CSS.
