How to add a drop shadow to the horizontal line on a Squarespace site
Adding subtle visual effects like drop shadows can dramatically improve the overall appearance of your Squarespace website. This tutorial shows you how to add a drop shadow to horizontal lines on your site, making them stand out with more depth and style.
This method works with both Squarespace 7.0 and 7.1, making it a flexible enhancement for almost any site. Whether you're separating sections on a homepage, portfolio, or blog post, this trick adds a refined visual touch without overwhelming your layout.
Table of Contents
Why Add a Drop Shadow to Horizontal Lines?
Here are a few good reasons to enhance horizontal lines with a drop shadow:
Creates Depth: Adds a subtle 3D effect, making your layout feel more layered.
Draws Attention: Helps guide the visitor's eye to key content sections.
Modern Look: Gives simple dividers a stylish, custom-designed feel.
Highlights Sections: Helps important page divisions stand out.
Even minor enhancements like this can elevate the overall design of your site and improve user experience.
Complexity: Easy
Step-by-Step Instructions
Step 1: To add a Drop Shadow to the horizontal line, simply copy the code below:
// Horizontial Line Color// .sqs-block-horizontalrule hr { filter: drop-shadow(3px 4px 6px #FFBF00); }
Step 2: From the Squarespace dashboard navigate to Pages > Custom Code > Custom CSS and paste the code.
You can then adjust the drop shadow settings to your liking
Key Takeaways
This technique works on both Squarespace 7.0 and 7.1.
Drop shadows help enhance visual hierarchy and design depth.
You can easily customize the shadow color, blur radius, and position.
Works site-wide for all horizontal rule blocks.
FAQs
Can I change the shadow color?
Yes! Replace #FFBF00
in the code with any hex color value to match your site’s branding.
Will this affect my entire site?
Yes, this CSS applies to all horizontal rules. To target a specific page or section, you can use #collection-id
or #blockidnumber
selectors.
Can I remove the effect later?
Absolutely. Just delete the code from the Custom CSS editor and the shadow will be removed.
Is it mobile-friendly?
Yes. The drop shadow effect renders well on mobile devices, enhancing but not obstructing design.
How can I target and style only one specific horizontal line on a page with a drop shadow?
You can add a drop shadow to just one horizontal line by targeting it using a unique block ID (e.g., #block-yui_3_17_2_1_1700000000000_1234
) in your CSS. Use the Squarespace Block Identifier Chrome extension to locate the block ID.
Can I animate the drop shadow effect when someone scrolls or hovers over a horizontal line?
Yes, you can use CSS transitions or animations to create hover or scroll effects on your horizontal lines. This requires additional CSS using pseudo-classes like :hover
or JavaScript for scroll-triggered changes.
Conclusion
Adding a drop shadow to horizontal lines in Squarespace is a small tweak that makes a big difference. It enhances depth, draws attention to key areas, and gives your site a sleek, modern edge. By simply pasting a few lines of CSS into your Custom CSS editor, you can elevate your site’s visual quality in just minutes.
Take this opportunity to explore more subtle visual enhancements — it’s often the little touches that make a site feel truly professional.