Skip to content Skip to footer

How to Create a Vertical Sticky Sidebar with Containers in Elementor

A vertical sticky sidebar is a fixed navigation bar that remains visible on the side of a webpage as the user scrolls. This type of design is perfect for directories, quick navigation menus, contact details, or other important content that you want users to access quickly. It enhances usability and ensures smooth navigation across different sections of your page.

image 20
How to Create a Vertical Sticky Sidebar with Containers in Elementor 23

What is a Vertical Sticky Sidebar?

A vertical sticky sidebar on the web page’s side stays fixed within the user’s view as they scroll. It allows easy access to different sections of the page or external resources. Common uses for vertical sticky sidebars include:

  • Quick navigation menus for multi-section pages
  • Contact information or calls-to-action
  • Table of contents or category links

Prerequisites

Before diving into the steps, make sure you have the following:

  1. Elementor Pro has been installed and activated (sticky effects require the Pro version).
  2. A page to add the vertical sticky sidebar (this can be a new or existing page).
  3. Basic familiarity with Elementor’s Flexbox Container layout (recommended for modern designs).

Step 1: Create a Single Page Template

First, we’ll create a single-page template to serve as the foundation for the sticky sidebar.

  1. Navigate to WordPress Admin > Templates > Theme Builder and click Add New.
image 21
How to Create a Vertical Sticky Sidebar with Containers in Elementor 24

2. In the popup window, select Single Page as the template type and give it a name, such as “Service Page Template.”

image 22
How to Create a Vertical Sticky Sidebar with Containers in Elementor 25

3. In the Template Library, browse or search for a page template that fits your design needs (e.g., “Service” or “Company”). You can use the search bar for quicker results.

image 23
How to Create a Vertical Sticky Sidebar with Containers in Elementor 26

4. Assign display conditions if the template is for specific pages or post types.

Step 2: Add a Container for the Sticky Sidebar

  1. Add a new container: In the Elementor editor, drag and drop a new container onto the page. This will serve as the parent container for your sticky sidebar.
image 24
How to Create a Vertical Sticky Sidebar with Containers in Elementor 27

2. Set container direction: In the container’s settings, set the direction to Vertical (column layout). This ensures that the content within the sidebar stacks vertically.

image 25
How to Create a Vertical Sticky Sidebar with Containers in Elementor 28

3. Define the container width: In the Style tab, set the container’s width to a suitable value, such as 200px, to ensure it doesn’t take up too much space on the page. Adjust the width based on your design needs.

image 26
How to Create a Vertical Sticky Sidebar with Containers in Elementor 29

Step 3: Add Navigation Items

Now that the container is set up, you can add navigation elements to the sidebar.

  1. Insert a heading: Drag the Heading widget into the container and set it to something like “Quick Navigation” or “Table of Contents.”
image 27
How to Create a Vertical Sticky Sidebar with Containers in Elementor 30

2. Add navigation items: Below the heading, add a List widget or Button widgets for navigation. For this example, we’ll use the Icon List widget to create a visually appealing menu.

image 28
How to Create a Vertical Sticky Sidebar with Containers in Elementor 31

Example Menu Items:

image 29
How to Create a Vertical Sticky Sidebar with Containers in Elementor 32
  • About Us: Links to the company overview section.
  • Services: Links to the services section.
  • Testimonials: Links to client feedback.
  • Contact Us: Links to the contact form and details.
image 30
How to Create a Vertical Sticky Sidebar with Containers in Elementor 33

Step 4: Set Anchor Links

image 31
How to Create a Vertical Sticky Sidebar with Containers in Elementor 34

For each navigation item, set an anchor link that corresponds to the target section of the page.

  1. Add an Anchor widget: Drag the Menu Anchor widget to the desired section of the page (e.g., above the “About Us” heading).
image 32
How to Create a Vertical Sticky Sidebar with Containers in Elementor 35

2. Assign an ID to the anchor: In the settings, name the anchor something like about-us, services, testimonials, or contact-us.

image 33
How to Create a Vertical Sticky Sidebar with Containers in Elementor 36

3. Link the navigation item: Go back to the Icon List in the sidebar and link each menu item to its corresponding anchor (e.g., #about-us).

image 34
How to Create a Vertical Sticky Sidebar with Containers in Elementor 37

Repeat this process for each menu item to create a fully functional navigation menu.

image 35
How to Create a Vertical Sticky Sidebar with Containers in Elementor 38

Step 5: Make the Sidebar Sticky

To ensure the sidebar stays visible while scrolling, apply the following CSS to make it sticky:

  1. Set a CSS ID: Select the container and, in the Advanced tab, assign a CSS ID, such as sidebar.
image 36
How to Create a Vertical Sticky Sidebar with Containers in Elementor 39

2. Add Custom CSS: In the same tab, scroll down to the Custom CSS section and enter the following code:

#sidebar {
    position: fixed; /* Keeps the sidebar fixed on the page */
    left: 0; /* Aligns the sidebar to the left */
    top: 0; /* Starts the sidebar at the top of the page */
    height: 100vh; /* Sets the height to fill the viewport */
    width: 200px; /* Adjust width as needed */
    z-index: 10; /* Ensures it stays above other elements */
    padding-top: 250px; /* Adjusts the top padding */
    overflow-y: auto; /* Enables scrolling within the sidebar if content overflows */
    display: flex; /* Uses Flexbox layout */
    flex-direction: column; /* Stacks items vertically */
    justify-content: center; /* Centers items vertically */
}
image 37
How to Create a Vertical Sticky Sidebar with Containers in Elementor 40

This CSS will make the sidebar stick to the side of the page while remaining functional and responsive.

Step 6: Customize the Sidebar’s Style

To match the sidebar’s design with your website’s theme, customize its appearance in the Style tab.

image 38
How to Create a Vertical Sticky Sidebar with Containers in Elementor 41
image 39
How to Create a Vertical Sticky Sidebar with Containers in Elementor 42
  1. Background color: Choose a color that contrasts with the page content to make the sidebar stand out.
image 40
How to Create a Vertical Sticky Sidebar with Containers in Elementor 43

2. Shadow effects: Add a box shadow for depth, giving the sidebar a floating effect.

image 41
How to Create a Vertical Sticky Sidebar with Containers in Elementor 44

3. Typography: Adjust font sizes, colors, and spacing for readability.

4. Padding and margins: Fine-tune the spacing to align with your page’s layout.

Step 7: Preview and Publish

  1. Preview your design: Use Elementor’s preview feature to ensure the sticky sidebar behaves as expected when scrolling.
  2. Adjust content: Refine the spacing, alignment, and size of navigation items to ensure a clean and user-friendly design.
  3. Publish the page: Once everything is finalized, click Publish to make the page live.

Final Thoughts

A vertical sticky sidebar is a valuable addition to any website, providing quick navigation and improving the user experience. With Elementor, creating one is straightforward using containers, anchor links, and custom CSS. By following these steps, you can design a functional and visually appealing sticky sidebar that stays accessible as users scroll through your site.

Whether you’re building a corporate page, a blog, or an e-commerce store, this feature can elevate your site’s usability and style.

Leave a comment

E-mail
Password
Confirm Password