Skip to main content

Sticky Header Overlaps Anchor in Elementor Page Builder Wordpress

Elementor's anchor widget is fantastic tool for creating internal link to jumps on your webpage, perfect for one-page website.
However, used together with a fixed header or sticky navigation, this can be a problem.  When an anchor link is clicked, the fixed header might block the content you're trying to scroll to.  This blog will show you how to fix that.

Adding Elementors Anchor Widget

For this article, this is how our Elementor anchor widget is implemented. We just add it above the headline or Title  that we want the visitor to scroll.

This is how the Anchor widget is implemented in Elementor.
This is how the Anchor widget is implemented in Elementor.

Problem: Sticky Header Overlaps Anchor

Let’s have a quick look at what we are presented with when making no adjustments and simply try to use a sticky navigation with Elementor anchor widget. Here is what we get by default.


Solution: A few simple lines of CSS

Here are two ways to add the CSS code to fix your anchor widget and sticky header:

  • Child Theme's style.css file: This option applies the fix to all anchor widgets on your entire website.
  • WordPress Customizer > Additional CSS: This is also a great option for applying the fix globally.


body:not(.elementor-editor-active) .elementor-widget-menu-anchor {
   position: relative;
   z-index: -1;
 }
 body:not(.elementor-editor-active) .elementor-menu-anchor:before {
   content: "";
   display: block;
   height: 100px; // fixed header height
   margin: -100px 0 0; // negative fixed header height
   visibility: hidden;
   pointer-events: none;
 }

Make sure to play with the height/margin values above until it suits your needs. Just make sure you keep the same values (eg, height at 100px and margin at -100px). This is how things look like with the CSS snippet applied.
And that’s it! This will fix the overlapping sticky header when using anchor widgets with Elementor.

Comments

Popular posts from this blog

Tutorial : How To Convert PDF To Google Sheets [Easy]

In Today Digital Age, Whether You're student, a professional, or a business owner, you'll often find yourself needing to convert data from one format to another. One Most Common challenge is Converting PDF files into Google Sheets. In This Article  We comprehensive guide on how to convert PDF to Google Sheets efficiently and effectively. let's explore the various methods for converting your PDF files into Google Sheets. Convert PDF To Google Sheets Method 1: Using Google Drive Upload your PDF: Sign in to your Google Drive account, click the "+ New" button, and choose "File upload." Select your PDF file. Right-click the PDF: Once uploaded, right-click on the PDF file, choose "Open with," and select "Google Sheets." Review and adjust: Google Sheets will attempt to convert your PDF into a spreadsheet. Review the results and make any necessary adjustments. Save your work: Finally, save your converted file by clicking "File" ...

Organic Farm : Free Divi landing page layout

Landing pages are some of the most crucial pages of any website. They provide the information your visitors need to make a quick decision about your business, and direct readers to your call to action. Organic Farm displays a CTA over a full-screen image in parallax that moves in the opposite direction on scroll. The next section displays blurbs with large icons to show services with butiful hover effect. The Next Two Column Some information with image with animation. this layout you can Also use as Full One page Website. Organic Farm layout is Complete Solution for Your Website Contact Us Section, Map Section, Footer, News Section, Testimonial Section, Number Counter Section, About Us Section and Header Section All.. Organic Farm  Downlaod 

Optimizing Your E-commerce Site: How to Modify Category Order in WordPress and WooCommerce

Have you ever tried to change the default order of the category in your WordPress and WooCommerce site? If the answer is yes, then you’ll be surprised to know how easily you can change category orders using our effective ways. The arrangement of categories plays a pivotal role in shaping how your audience interacts with your content. However, WordPress, in its default configuration, arranges categories alphabetically, resulting in a rigid and sometimes confusing category list. This situation highlights the importance of customizing category orders in WordPress to create a more engaging and meaningful user experience. WooCommerce site owners face a similar challenge when it comes to product categories, prompting them to seek ways to tailor the order. In this article, we will provide you with step-by-step instructions on how to modify category and taxonomy term orders in WordPress, and how to rearrange product categories in WooCommerce.  Changing the category order in WordPress and W...