How to Create a Shrinking Sticky Header With Divi

by | Aug 9, 2024 | Blogging, Tips & Tricks, Tutorials | 0 comments

Affiliate Disclosure: Some of the links in this post are affiliate links, which means we may earn a commission if you click through and make a purchase. For more details, please read our Affiliate Disclosure Policy.

Are you ready to design a shrinking sticky header for your website? Your wait ends here! In this tutorial, we’ll guide you through the process step-by-step, ensuring you can create a sleek and functional header that enhances your site’s user experience. From selecting the right settings to adjusting padding and enabling the sticky feature, we’ll cover everything you need to know. By the end of this guide, you’ll have a beautifully designed shrinking sticky header that responds dynamically as users scroll. Let’s get started and transform your website’s header into a standout feature! 

Boost User Experience with Divi’s Shrinking Sticky Header

The Divi Shrinking Sticky Header is a design feature, as you scroll down the webpage, the header slightly expands to provide more visibility. The degree of shrinking can be adjusted based on your customization preferences. This feature allows your visitors to view more content on your webpage. It is more attractive and responsible for user experience, when some body scrolling, it reduces the space taken by the global header in their viewport. This means more content is visible in the viewport, enhancing the user experience by making more information accessible without excessive scrolling. A shrinking sticky header is the perfect solution to keep your header accessible while improving the aesthetic of your site. Creating one is simple, and there are many ways to do it. If you already have a header, you can easily make it a shrinking sticky header, or you can create it from scratch. 

Read More: Create a Divi Website in Just 2 minutes with Divi Quick Sites

Configure Menu Settings

Before creating a shrinking sticky header, You should be familiar with creating a menu in the WordPress Dashboard before working with the Divi theme. Don’t worry; it’s quite simple. First, create a new menu as shown in the image below. Click on the Appearance section and select Menus. Create a new menu and give it a name of your choice. Click on Primary Menu to set your menu as the primary menu and add pages from the left side under (Add Menu Items).

Screenshot of the WordPress dashboard showing the Appearance section with the Menus option highlighted. The process of creating a new menu is illustrated, including naming the menu, setting it as the primary menu, and adding pages from the 'Add Menu Items' section.

Configure Menu Settings

Creating a Beautiful Header in the Divi Theme

After creating the menu, follow these steps to create a beautiful header in the Divi theme. Click on Divi and select Theme Builder as shown in the image below. After clicking on Theme Builder, you will find the Divi Theme Builder dashboard. At the very top of the Theme Builder, click on Build Global Header. A new dashboard will open.

Screenshot of the Divi Theme Builder interface with the settings icon highlighted. The Content section shows the background color selection, and the Design section displays spacing and padding adjustment options.

 Creating a Beautiful Header in the Divi Theme

Customizing Your Header in the Divi Theme

To create a simple header, you will see three initial options: Start Building, Browse Layouts, and Choose Page. Click on Start Building. Then, click on the settings icon on the left side. In the Content section, choose a background color that suits your design preferences by clicking on Background. Next, proceed to the Design section to adjust spacing and padding according to your customization needs. In the Content section, choose a background color that suits your design preferences by clicking on Background. Next, proceed to the Design section to apply spacing. Adjust the spacing and padding according to your customization needs, as outlined below.

Screenshot of the Divi Theme Builder interface with the settings icon highlighted. The Content section shows the background color selection, and the Design section displays spacing and padding adjustment options.

Customizing Your Simple Header in the Divi Theme

Read More: Design a Website with AI: Build and Customize Your Site in Minutes

Adding menu to the Header

Now it’s time to create a row with two columns: one for the logo and the other for the pages. Click the plus button to access the row and column layout options. Select the desired layout shape to create a row with two columns. In the new row, click the plus button in the column where you want to place the menu. Upon clicking the plus button, you will see New Module and Add from Library options. In the New Module section, use the search bar to find and select Menu. This will insert the menu into the selected column. Next, click the Menu settings icon, which will provide three options: Content, Design, and Advanced. In the Content section, locate the Menu option and select the menu you previously created by name.

Congratulations, your menu should now be displayed in the selected column. The final step is to customize the design according to your preferences. You can adjust the color, padding, and spacing as needed. All the steps mentioned are illustrated in the image below. 

Divi process for setting up a logo and menu: choosing row layout, using the menu module, and personalizing design

Adding menu to the Header

Ready to Design a Shrinking Sticky Header!

Are you excited to make your header shrinking and sticky? Your wait ends here! Let’s get started. As you can see, there are three color options that appear when you hover your mouse over the header: the first color is blue, representing the whole section settings header setting; the second is green, representing the whole row setting; and the third one is dark gray, representing the menu setting.

Enabling the Sticky Option

Before you can create a Shrinking Sticky Header in Divi, it is essential to enable the Sticky Option, which is represented by a small pin icon. Without this feature, you won’t be able to achieve the desired shrinking effect, as the entire process relies on this option.

To enable the Sticky Option, start by clicking on the settings for the entire row, as shown in the image below. Next, navigate to the Advanced Setting tab, scroll down until you find the Scroll Effects Option, and click on it. You’ll see the Sticky Position Option at the top of this section. Select Stick to Top by clicking on it, ensuring this option is activated. Finally, click the green tick button, as shown in the image, to save your settings.

Instructions to enable the Sticky Option in Divi for creating a Shrinking Sticky Header. The process involves accessing row settings, navigating to the Advanced tab, selecting Scroll Effects, and activating Stick to Top under Sticky Position. The settings are saved by clicking the green tick button.

Enabling the Sticky Option

Padding and Spacing for Stunning Layouts

To create a stunning layout with proper padding and spacing, start by selecting the row, indicated by the green section, and navigate to the Design Option tab, where you’ll find the Spacing option. First, ensure that the margin is set to zero. Then, apply a top padding of 42px and leave the bottom padding at zero, although these values may vary depending on your design needs. Padding is essential for aligning text or modules in the center of the section. Once you’ve made these adjustments, click the green checkmark button to confirm your settings. Next, access the menu settings by clicking the dark gray button, and repeat the process by adjusting the padding in the Design section. Fine-tune the top and bottom padding as needed to achieve your desired layout, ensuring everything is perfectly aligned.

Instructions for creating a stunning layout in Divi by adjusting padding and spacing. The process includes selecting the row, navigating to the Design tab, setting the margin to zero, applying a top padding of 42px, and confirming the settings. The menu settings are also adjusted in the Design section to fine-tune the layout, ensuring perfect alignment of text and modules.

Padding and Spacing for Stunning Layouts

Read More: Divi header and footer layouts.

Making Your Header Sticky

To make your header sticky, start by clicking on the Row Settings section, as illustrated in the image below. Next, navigate to the Design Settings option and select Spacing. Hover your mouse over the Margin field to reveal the Pin Icon Button, and click on it. Choose the Desktop option and set the top margin to your preferred value (e.g., 70px). Then, click on the Pin icon next to the Desktop setting and adjust the right margin to Zero (0). It is crucial to set the right margin to zero to ensure the header sticks to the top of the page. Finally, verify that the padding below the margin is also set to zero for the top, bottom, left, and right sides. This process will create a header that remains fixed at the top as users scroll through the page.

Instructions for making a header sticky on a webpage. The process involves accessing the Row Settings, going to the Design Settings, and selecting Spacing. The image highlights the Margin field with a Pin Icon, where users are guided to set the top margin (e.g., 70px) and the right margin to zero. Additional padding settings for the top, bottom, left, and right are adjusted to zero, ensuring the header remains fixed at the top of the page while scrolling.

Making Your Header Sticky

Read More: Make Custom Divi Header Fixed or Sticky

Configuring the Shrinking Effect for Your Sticky Header

Once you’ve established the sticky effect for your header, you can add a shrinking effect. Begin by following the same steps as before: click on the Row Settings section and then select Design. In the Design Settings, choose Sizing and scroll down to the Height option, as shown in the image below. Hover your mouse over the Height field to reveal the Pin Icon, and click on it. Set the Desktop height to 160px, or your preferred value. Then, click on the Pin icon next to the Desktop setting and adjust the height to Zero (0).

It is important that the height for the shrinking effect is set to a smaller size compared to the Desktop setting, but it does not necessarily have to be zero; you can set it to 10px or any value you prefer. This adjustment ensures that your header will shrink effectively while maintaining its sticky position.

Read More: Create a Divi Website in Just 2 minutes with Divi Quick Sites

Steps to configure the shrinking effect for a sticky header in a webpage. The instructions involve accessing the Row Settings, navigating to the Design section, and adjusting the Sizing settings. The image shows the Height option with a Pin Icon, guiding users to set the Desktop height to 160px (or a preferred value) and then reduce the height to zero or another smaller value for the shrinking effect.

Final Result

Final result of a shrinking sticky header on a webpage, demonstrating the Header's ability to decrease in size smoothly as the user scrolls down, maintaining navigation visibility while optimizing screen space for content.

Final Result

Conclusion

In this comprehensive guide, you’ve successfully learned how to create a Shrinking Sticky Header using the Divi theme, a powerful feature that not only enhances the visual appeal of your website but also significantly improves user experience. By following the step-by-step instructions, you’ve gained the skills to build a dynamic header that remains visible as users scroll, shrinking in size to free up valuable screen space for content.

The process began with configuring menu settings in the WordPress Dashboard and crafting a beautiful header using Divi’s Theme Builder. You’ve explored the importance of spacing and padding, ensuring that your header is not only visually attractive but also perfectly aligned. You’ve also discovered how to enable the sticky option, which is crucial for achieving the shrinking effect. Finally, you’ve configured the shrinking effect itself, ensuring that your header reduces in size as users scroll down the page.

The Shrinking Sticky Header is more than just a stylish design element; it’s a functional enhancement that keeps your website’s navigation easily accessible, reducing the need for excessive scrolling. This balance between aesthetics and functionality is key to providing a seamless and enjoyable user experience. By keeping important navigation elements within easy reach, you’re ensuring that visitors can interact with your content more efficiently.

Whether you’re updating an existing header or starting from scratch, the Divi theme offers all the tools and customization options you need to create a polished, Unique Divi Header Design that stands out. The steps provided in this guide are designed to be straightforward yet flexible, allowing you to tailor the header’s design to fit your unique needs and preferences.

As you continue to experiment with different styles and settings, remember that the Divi theme is a powerful tool that can be used to create truly stunning websites. Don’t hesitate to revisit this guide whenever you need a refresher, and feel free to reach out if you encounter any challenges along the way.

Thank you for following along with this tutorial. We hope it has empowered you to take full advantage of what Divi has to offer. Continue exploring and experimenting with Divi’s features, and enjoy the process of creating a website that not only looks great but also functions seamlessly.

Read More: Exploring Divi Starter Sites: The Key Feature of Divi Quick Sites

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Featured Divi Products

 

Recommended Hosting

Pin It on Pinterest

Shares