Slanted Index Sections in Squarespace
Some time ago, I wrote an article outlining how to create slanted headers and footers as a way to add some fun visual interest to a website. That small bit of code was then featured within the Ghost Plugins library, and I’ve since been bombarded with emails containing questions about how to add slanted sections within a Brine Index.
As far as I know, there isn’t a way to slant the line between pages stacked together in an index. However, you can create the illusion of slanted section breaks very, very, easily.
I implemented this technique on a small website I did for a friend. See a live demo.
Here’s How It’s Done
For this to work, you’ll need a section with a banner and a section with a solid background colour.
The code below creates an overlay over top of the banner with an angled gradient; the gradient goes from transparent to a solid colour that matches the colour of the page below. However, instead of a smooth gradient, we set the gradient so that it transitions from transparent to solid very abruptly, so it looks like a hard line.
Don’t worry if that doesn’t make sense. I probably didn’t explain that very well, but you might understand better when you see it and play around with the code a little.
Slanted Bottom Code
Place the following code in your custom CSS panel (Design > Custom CSS).
NOTE: The URL slug of the section that I wanted to add this slanted bottom to was named “/social,” that’s why I’ve written #social to target that section:
#social::before {content: '';width: 100%;height: 100%;background: linear-gradient(175deg, rgba(0,0,0,0) 85%,
#000 85.1%);position: absolute;top: 0;left: 0;z-index: 2;
}Explanation
The live demo and the example image above has a slant on the top and bottom of the section, which I will describe later. You don’t need to read the whole explanation if you’re not interested. You can just copy and paste the code and change the hex code (#000) to suit your site.
Here’s what’s happening in the code above to create a black, slanted pseudo-element at the bottom of the section with the banner.
content: creates the pseudo element with no content inside.
width: makes the element 100% of the width of the browser.
height: makes the element 100% of the height of the browser.
background: used to define the background colour or image of the section.
linear-gradient: usually used to display smooth transitions between two or more specified colors. The linear gradients
syntax is (direction, color-stop 1, color-stop 2, ... color-stop 3, 4, 5 if you want).
175deg: adjusts the pitch of the angle.
rgba(0,0,0,0): this is the color of the top part of the gradient, the last number of rgba defines the opacity. 0 = fully transparent. If we didn’t make this transparent, the entire element would be a large solid block that covered the whole banner.
85%: defines the position where the color ends.
#000: this is the hex code for black. Change this color to match the color of your index section.
85.1%: defines the position where the next color starts. Typically this number would be farther away from the first number to create a smooth gradient, but we don’t want a smooth gradient, we want a hard line.
position: positions the element relative to its parent element.
top: defines the top position of the element (stuck to the top of the section in this case).
left: defines the left position of the element (justified left in this case).
Slanted Top & Bottom Code
This is essentially the same as the code above, except it adds two more color-stops which creates a slanted color block at the top and a transition into transparency 12% of the way down. The bottom colour starts again at 85% of the way down.
#social::before {content: '';width: 100%;height: 100%;background: linear-gradient(175deg, #000 12%,
rgba(255, 255, 255, 0) 12.1%,
rgba(255, 255, 255, 0) 85%, #000 85.1%);position: absolute;top: 0;left: 0;z-index: 2;
}Slanted Top Code
You probably understand how this works by now.
#social::before {content: '';width: 100%;height: 100%;background: linear-gradient(175deg, #000 12%,
rgba(255, 255, 255, 0) 12.1%);position: absolute;top: 0;left: 0;z-index: 2;
}
I hope you find this helpful.
Until next time 👋🏽
Related Articles:
Learn how to turn the inset border on a Squarespace section into a blurred image frame using just 6 lines of custom CSS. Step-by-step tutorial with a code generator.
Create a vertical scrolling testimonial carousel to any Squarespace site. Includes a live code generator where you can type in your own reviews, customize colors, speed, and card styles, and copy the finished code in one click.
Uploaded a video to Squarespace but can't find a way to download it back? Here's a quick workaround to retrieve your hosted video files when the download button is missing.
Learn how to add quizes, polls, and surveys to your Squarespace website without code using Opinion Stage. A free tool to turn quizes and polls into lead generators.
Create anchor links in Squarespace 7.1 without coding! Learn to make smooth scrolling internal links for same-page navigation, links to other pages, and SEO-friendly anchor links. Get solutions for unsupported sections too.
A complete guide to the 2026 Squarespace Circle program changes, including how to qualify for Gold and Platinum status, earn points, and unlock exclusive discounts.
Create a typewriter effect header with a blinking cursor on your Squarespace site using one simple code block.
Add a 'View Project' button overlay to your Squarespace portfolio thumbnails. This code snippet is an easy plug-and-play solution to enhance your Squarespace website design.
Learn how to write original content as a Squarespace designer without relying on AI-generated templates. This guide covers a five-step process for creating blog posts that keep your unique voice while using AI as a helpful tool.
Add a collapsible floating side navigation menu to your Squarespace site with this code snippet. Keep links accessible without clutter, customize icons and colors, while being fully responsive. Follow the step-by-step guide to integrate it seamlessly.
Learn how to customize the default 'Sign up for News and Updates' text in Squarespace forms with a simple JavaScript snippet. This quick guide will help you align your forms with your brand’s tone and messaging, boosting engagement and maintaining consistency.
Discover Generative Engine Optimization (GEO) and learn how to rank in AI-generated search results from tools like ChatGPT and Google Gemini. Build a strong SEO foundation, optimize for informational queries, and adapt to AI-driven search behavior for future-proof visibility.
Learn how to reposition your Squarespace header to the bottom of the page using a simple CSS code snippet.
In this tutorial I will teach you how to add a polaroid photo effect to the Squarespace Instagram block.
In this tutorial I will teach you how to change images on hover in Squarespace Fluid Engine and 7.1 using a very simple CSS code.
In this article I will guide you through the process of implementing the Ken Burns effect on your Squarespace images, galleries, and section banners using CSS.
When a member logs into their Member Area account, the page simply refreshes and the user panel opens. This can be confusing and not the best user experience. In today's article, I'll show you how to solve this problem by sharing a simple code snippet that you can add to your website
In today's digital landscape, websites must be designed with responsiveness in mind. As a Squarespace designer, one of the most important steps in my web design process is ensuring my websites are responsive and look amazing on all displays, be it mobile, tablet, or desktop.
If you’re a business owner or a freelancer, you know that it can be stressful enough having an unstable and variable income. The last thing you want to worry about is clients that ghost you after your work is done. Your livelihood depends entirely on invoices paid on time by your clients. Unfortunately, that doesn’t always happen. Since starting my web design business, I have not encountered this problem once. Here are some tips to prevent late and non-payments
If you're a fan of Squarespace like I am, you'll know that 2022 was a banner year for the platform. They completely revamped their website builder with the "Fluid Engine" layout editor and let me tell you - it was a game changer. Building websites on Squarespace just got a whole lot easier and more stylish. But that's not all - they also rolled out a ton of new features that made it possible to create professional-grade websites without any coding skills. These updates were a total dream for anyone who loves to tinker with their website and try out the latest design trends. In this article, I'll be sharing all the details about these new features and giving you my honest thoughts on them.
Adding floating social icons that are always visible to your website is an easy way to encourage visitors to follow you on your chosen platforms and stay up to date with your content. Not only do these icons provide an easy way for visitors to connect with you, but they also contribute to the professional and cohesive look of your site. The new Fluid Engine update to Squarespace means the codes we used on 7.1 to achieve this are no longer viable and they need some tweaking.
In the web design business, like any tech-related business, technologies and trends move & change at an impossibly rapid rate. You’ve probably noticed many of these trends emerging already. If not, you’re going to notice them after reading this article.
Squarespace has just released a new feature that I've been wanting for a while: Saved Sections. In this post, I'll give you an overview of what Saved Sections are, how to use them, and how they can improve your Squarespace workflow.
In this article, I’ll show you how to create an anchor link sidebar navigation in Squarespace 7.1 and Fluid Engine.
In this article, I’ll show you how you can force the mobile navigation to show all the time, even when viewing on desktop browsers in Squarespace 7.1.
Like many, I left high-school with the task (read: burden) of deciding, that very minute, what it was that I was going to do for the rest of my life to make some semblance of a living in this tremendously costly city I call home. What do I want to be when I grow up? In western society, what that really means is: Which profession will define me a person, and how many expensive and unnecessary things do I want to buy to impress people I don’t like?
The Brine family of templates in Squarespace 7.0 offered a lovely, optional parallax feature that could be applied to banner images. 7.1 does not currently offer this option. However, with a little bit of code, we can add a (more flexible) version of the parallax effect to banner images in this updated design system.
Logos are essential for the branding of your company, and can also have an effect on the overall design of your site. This can certainly be an intimidating process if you have never designed a logo before, but it doesn’t have to be.
A complete guide to Squarespace’s 2025 pricing—Basic, Core, Plus, and Advanced. Use our free plan selector to quickly find the perfect tier for your site.