Skip to main content

January 17, 2026

3 Ways to Create Overlapping Sections in Webflow

4 min read

If you've ever tried to create an overlapping section or a clean two-tone background in Webflow, you've probably run into one of two problems.

Either you end up with a bunch of empty divs just for background color… or things look fine on desktop and completely fall apart on mobile.

In this post, I'm going to walk you through three different techniques for creating overlapping sections and two-tone backgrounds—and help you understand when to use each one.

Technique 1: CSS Gradients in the Webflow Style Panel

This is the simplest and most "Webflow-native" approach. It doesn't require any custom code, and it works great for straightforward designs.

How it works:

  1. Select your section
  2. Open the Styles panel and click the + button to add a background
  3. Choose Gradient and set it to go downward (180°)
  4. Add four color stops:Stop 1: Transparent (0%)Stop 2: Transparent (50%)Stop 3: Your background color (50%)Stop 4: Your background color (100%)
  5. Stop 1: Transparent (0%)
  6. Stop 2: Transparent (50%)
  7. Stop 3: Your background color (50%)
  8. Stop 4: Your background color (100%)

The key: Make sure your two center stops are at the exact same percentage. This creates that crisp, hard line instead of a blurry gradient.

Adjusting for mobile:

If you need to adjust the split point on smaller screens, you'll have to manually update both center stops on each breakpoint. This is where things can get tedious—if you want the line at 40% on mobile, you need to change both the transparent stop and the colored stop to 40%.

When to use this method:

  • Quick, one-off sections
  • Designs where the split point stays consistent across breakpoints
  • When you want to stay inside Webflow's native tools

Technique 2: CSS Gradients with Custom Code

This method does the same thing as Technique 1, but uses a code embed instead. It's more work upfront, but much easier to manage if you're using this effect throughout your site.

Why use code instead of the style panel?

  • You only need to change one --split variable instead of two color stops
  • You can use media queries to fine-tune breakpoints beyond Webflow's defaults
  • You can turn it into a reusable component

Here's the code:‍

<style>

:root {
  --top: var(--_theme---theme-background--bg-dark);
  --bottom: var(--color-brand--transparent); /* Desktop */
  --split: 40%; /* iPad */
  @media (max-width: 62rem) {
    --split: 30%;
  } /* Mobile Portrait */
  @media (max-width: 30rem) {
    --split: 20%;
  }
} /* Change the class to match your section */
.section_pastors {
  background: linear-gradient(
    to bottom,
    var(--top) 0%,
    var(--top) var(--split),
    var(--bottom) var(--split),
    var(--bottom) 100%
  );
}


</style>

How to set up your color variables:

  1. Go to your Webflow Variables panel
  2. Click the three dots on your color variable
  3. Click Copy CSS
  4. Paste that value into your code embed where --top or --bottom is defined

Pro tip: Turn this into a component. Once you've got the code written, you can drop in the component, unlink it, and just update the section class and variable values. Much faster than rebuilding it every time.

When to use this method:

  • You're using two-tone backgrounds throughout the site
  • You need more control over breakpoints
  • You want a reusable, easy-to-update system

Technique 3: Div-Based Background Wrappers with Component Properties

This is the most advanced technique, but it solves a problem the first two can't: giving clients control over background colors through component properties.

If you're building a component that gets used across many pages—and the background colors need to change depending on context—this is your solution.

The setup:

  1. Create a background wrapper div inside your component (set to position: absolute, width: 100%, height: 100%, display: flex, and z-index: 0)
  2. Inside that wrapper, add two more divs—one for the top portion, one for the bottom
  3. Set the top div height to control where the split happens (e.g., 30%)
  4. Set the bottom div height to 100% so it fills the remaining space
  5. Give both divs a base class like background-color
  6. Create combo classes for each color option (e.g., bg-light, bg-dark, bg-light-2)

The magic: Expose these as component properties.

Once your classes are connected to component properties, you (or your client) can change the top and bottom colors right from the component settings panel—no digging into the structure required.

When to use this method:

  • The component is used on many pages with different background needs
  • You need to give clients control over colors without touching the build
  • You want the flexibility to toggle the top panel on or off entirely

Which Technique Should You Use?

__wf_reserved_inherit

Wrapping Up

Overlapping sections and two-tone backgrounds are one of those details that can make a design feel polished and intentional. The trick is picking the right technique for the job:

  • Start simple with the style panel if it's a one-time thing
  • Use code when you need consistency and easier updates across breakpoints
  • Build with divs when you need maximum flexibility or client control

Hopefully this gives you a clear framework for tackling these layouts in your next Webflow project. If you have questions or want to see a specific technique covered in more detail, drop a comment below!

marketing health check clipboard showing score

Your Marketing Isn't Bringing in Leads and You Can't Figure Out Why

Score your marketing across 7 key areas in 5 minutes and find out exactly what's holding back your leads and what to fix first.

Questions You Might Be Asking

Your two middle color stops aren't at identical percentages. CSS only produces a hard line when two stops share the exact same position — for example, transparent at 50% and colored at 50%. If one is at 49.9% and the other at 50.1%, the browser interpolates between them and you get a soft blur. Double-check both values manually in Webflow's style panel.

CSS gradients (Techniques 1 and 2) are lightest — the browser paints them without extra DOM nodes. The div-based wrapper (Technique 3) adds a few elements and layout work, which is trivial on modern devices but adds up if you're nesting components heavily. For most sites the difference is negligible; pick based on flexibility needs, not perceived performance.

Yes. CSS supports multiple backgrounds on a single element — in the Webflow style panel, add the image layer first, then add the gradient layer. The image should be the lower layer so it shows through the transparent half of the gradient. Just watch the z-ordering if you have content overlapping the split; use a position and z-index so content sits on top.

Use a CSS custom property and update it with media queries in a code embed. Define --split: 50% at the root, then override it inside a media query for smaller viewports (say --split: 40%). Both gradient stops reference --split, so changing one variable adjusts both stops at once. That's the main reason Technique 2 scales better than the style-panel approach.

Stop losing deals to a website that's holding you back.

Book a 30-minute strategy session. You'll leave with a clearer picture of what your site needs to do and a rough budget range, whether you hire us or not.

background cta image collage of websites

Other posts in this category

video thumbnail showcasing video and how to build trust with testimonials in the background

How to build trust quickly with potential clients

Building trust with potential clients is something that will be the difference between making a sale or not. Here's how you can build trust quickly.

A three-way comparison graphic: three website mockups side by side labeled DIY Builder, Template, and Custom, each with a small price tag and a "best when" note beneath it, and an arrow underneath showing the progression as a business grows.

Is a Custom Website Worth It, or Should I Use a Template or DIY Builder?

Custom, template, or DIY builder? Here's how the three options compare, plus a simple decision framework.

confetti over Vimeo Video playing

How to Add a Confetti Animation When a Vimeo Video Starts Playing

Learn how to trigger a canvas confetti animation when a Vimeo video starts playing using the Vimeo Player API play event