We will create a Header from scratch with a logo and a navigation menu. We will style the menu in a way that that background of the header will be partly or fully transparent. We will optimise the header for all devices and make it sticky so when you scroll the header sticks on the top of the page.
We will add social icons and optimise those for all devices. Then I will show you how to change the background color, link and icon colors and the logo when you scroll so you will get something like this. I will also show you how to hide the social icons on a mobile.
After that we will create a top header with social icons and a call to action and style it in a way that it will not stick with the main part of the header. Also here we will optimise the topheader by adjusting the margin and padding pixel by pixel until we think it is perfect!
We will decide on which pages this header should appear, duplicate the complete header and remove the transparency, so we can apply it to the pages that do not need a transparent background.
In the end I will show you how you can export your beautiful header and import it to another website so you can use it over and over again on your or your clients Elementor Pro websites.
If you already have a header and you want to go directly to the sticky header part you can do that by going to the timestamps in the description. When you click on the timestamp you go directly to that part of the tutorial.
Share on facebook
Share
Share on twitter
Tweet
Share on linkedin
Share
Share on pinterest
Pin
Related: Learn more about WordPress
How to create a custom header with Elementor Pro
In this guide I build a custom header from scratch with the Elementor Pro Theme Builder. It has a logo, a menu with a dropdown, a call to action button and a small top bar with a rating. On the homepage the header has a transparent background over the hero image, and when you scroll down a white sticky header appears. All other pages get their own white version of the header.
This tutorial is part of my free Elementor Pro tutorial. If you are completely new to Elementor, start with my Elementor tutorial for beginners.
What you need
- A WordPress website with Elementor Pro. I recommend the Advanced plan, because the Essential plan misses some widgets and features. In the video the Advanced plan was about $99 per year for three websites.
- Your logo, ideally as an SVG in a dark and a light (white) version
- A WordPress menu with your pages
Step 1: Create the header in the Theme Builder
- In the WordPress dashboard, go to Templates, Theme Builder.
- Click Header. Close the template library, because I prefer to start from scratch.
- Give it a name, for example “Homepage header”, and click Publish.
- Click Add condition. By default it is shown on the entire website, but I choose Singular, Front page. Save and close.
Do you not see the header on your homepage? Then your homepage probably uses the Elementor Canvas template. Open the page in Elementor, go to Page settings and change it to Elementor Full Width. Now the page shows a header and a footer.
Step 2: Add the logo, menu and button
Add a flexbox container with the direction set from left to right. Then drag in an Image, a WordPress Menu and a Button.
- For an SVG logo, go to Elementor, Settings, Advanced and enable Unfiltered file uploads. SVGs are small and stay sharp. Upload your logo and set the width to 200 pixels. Link it to the homepage with a custom URL of “/”.
- In the container settings, set the Gap to 0, Align items to center and Justify content to Space between. Now the logo sits left, the menu in the middle and the button completely right.
- Remove the padding of the container and set a Minimum height of 70.
- Style the menu: set the horizontal padding of the items to 16, and make the hover, pointer and active colors orange (or your accent color).
- Style the button with uppercase, bold text.
For a dropdown, go to Appearance, Menus and drag pages under a parent item. Then style the dropdown in Elementor: a white background, a light version of your secondary color on hover, uppercase text in weight 700, a Border radius of 20 and a small Distance between the menu and the dropdown.
Step 3: Add a top bar and make the header transparent
Above the main header I add a second container with a Rating widget and two headings, like “4.9 based on 300 reviews” and “Trusted by 120,000 students”. I give it a minimum height of 40, text size 14, and center the content. If you want one element pushed to the side, go to Advanced and set its size to Grow.
To let the header float over the hero image:
- Rename the containers to “Top header” and “Main header” in the Structure panel.
- Give the main header a bottom margin of -70 pixels, and the header container a Z-index of 10 so it stays in front.
- Remove the background color of the main header.
- Make the menu text white and switch to the white version of your logo.
- On the homepage, add extra top padding to the hero so the content is not hidden behind the header.
Put the negative margin on the main header, not on the page. That works better once you add the sticky header.
Step 4: Optimize the header for tablet and mobile
- Switch to tablet view. Give the top header and main header smaller padding, for example 0 45 0 45, and set the gap to 10 pixels.
- Change the order: select the menu, go to Advanced, and for tablet set the Order to the end. Now the hamburger icon is on the right.
- Set the logo size to Grow on tablet so it pushes the button next to the hamburger.
- Style the toggle button: a white icon on your secondary color. If the dropdown is not centered vertically, set the dropdown to Full width under Content.
- Center the menu text in the dropdown, increase the vertical padding to 16 and adjust the distance.
- On mobile there is too much information. Select the “Trusted by” heading, go to Advanced, Responsive and enable Hide on mobile portrait.
Step 5: Show a different sticky header when you scroll
Making a container sticky is simple: go to Advanced, Motion effects and set Sticky to Top. But a transparent header that sticks is hard to read over your content. So I create a second, white header that appears when you scroll.
- Duplicate the main header and call it “Main header sticky”.
- Give it a white background, the dark logo and dark menu text.
- Under Advanced, add the CSS class sticky-header.
- Paste the “complete change of header on scroll” CSS from my Elementor Pro tutorial page into Custom CSS. If it does something strange the first time, undo and paste it again.
- Set Motion effects, Sticky to Top, and set the Effects offset to 250 pixels. The white header now appears after you scroll 250 pixels.
- Test it in an incognito window, because the editor does not show it like a visitor sees it.
I prefer no sticky headers on tablet and phone. So I set sticky to desktop only and hide the sticky header on tablet and mobile under Responsive.
Step 6: A white header for all other pages
On pages without a big hero image, a transparent header looks wrong. So I make a second header:
- In the header, click Save as template and name it, for example “White header sticky”.
- In the Theme Builder, open that header and give the main header a white background, a dark logo and dark menu text. I gave the top bar a light purple background with white text.
- Click Publish and set the conditions: include Entire site, and exclude Singular, Front page. Otherwise the homepage gets two headers.
Now the homepage has the transparent header and every other page has the white one.
Want to go further? On my Elementor Pro tutorial page you also find how to build a popup menu and a mega menu with Elementor Pro.
Frequently asked questions
Why does my Elementor header not show on the homepage?
Your page probably uses the Elementor Canvas template, which hides the header and footer. Change it to Elementor Full Width in the page settings, and check the display conditions of your header.
Can I use different headers on different pages?
Yes. With display conditions in the Theme Builder you can show one header on the front page and another on the rest of the site. Use include and exclude rules so a page never gets two headers.
How do I make a header sticky in Elementor?
Select the container, go to Advanced, Motion effects, and set Sticky to Top. You can choose on which devices it sticks and add an offset so it only appears after scrolling.
Can I upload an SVG logo in Elementor?
Yes. Enable Unfiltered file uploads under Elementor, Settings, Advanced. Then you can upload SVG files, which are small and stay sharp on every screen.



Ferdy,
I’ve loved your tutorials and have learned a lot from you. Thanks for that.
HOWEVER, I’ve had a REAL pain with Elementor and Astra. I’ve paid to go pro with both but nothing seems to work. Tried making changes to one of the Astra themes – nothing updated. Now I can’t even load the “Edit with Elementor” function.
I’m not a techy but not totally ignorant either. I created a site with Divi that worked well.
Mostly this is feedback to you. Not finding a way to communicate to you apart from leaving a comment here.
Best wishes for you in 2021. Hope you and yours are safe and healthy. Any help you can be is greatly appreciated.
– jacque
Geachte Ferdy,
heb je ook video’s waar in je uitlegt hoe je een privacyverklaring op je website plaats
https://youtu.be/1JS9wFvYUag?si=7aPpZgkYtlseCoq8
I m watching this video today, i m sure its too late , but where is header template..?
I m not able to find it…
The sticky header CSS works great for me for the menu.
The text goes to white and the background to black.
But for the drop down menu: the text goes to white – but the background stays white – so my text disappears!
What CSS code do I need to set the background of the dropdown menu to black please???
(I have set the dropdown background to grey as a work-around – but I don’t like it!)
Ferdy – I’m trying to create my header template, but instead of it using the menu names I had already set up in the back end, it is only showing “Item #1, Item #2, etc.” I’m afraid if I type the menu names in manually (your menu in this demonstration showed up automatically), they won’t link to the pages.
What am I doing wrong?
Hi Mindy! This is a common Elementor thing – the Nav Menu widget shows ‘Item #1, Item #2’ as placeholders in the editor. To fix it: click the Nav Menu widget → find the ‘Menu’ dropdown in the left panel → select your menu. The live site will show your actual menu items correctly. Hope that helps! ????
Hi Ferdy,
I notice that you don’t reply to these comments so I hope that you reply to this one. I successfully created the header. Your videos have come in clutch. Thank you.
However, i would like to now finish the footer section and don’t see any videos on this. Can you please advise?
Hi Ryan! Congrats on getting the header working! ???? For the footer it’s the same process in Elementor Pro: go to Templates → Theme Builder → Footer → Add New. Build it just like the header. You can also check the Elementor Pro playlist on my YouTube channel for more. Good luck!
Hi Ryan! Congrats on getting the header working! ???? For the footer it’s the same process in Elementor Pro: Templates → Theme Builder → Footer → Add New. Build it just like the header. Check the Elementor Pro playlist on my YouTube channel for more. Good luck!
Hi Ryan! Congrats on getting the header working! ???? For the footer it’s the same process in Elementor Pro: Templates → Theme Builder → Footer → Add New. Build it just like the header. Check my Elementor Pro playlist on YouTube for more. Good luck!
Hi Liz! To add your logo in Elementor: use the ‘Site Logo’ widget (found in the widget panel). Drag it into your header template in Theme Builder. Make sure you’ve set your site logo under Appearance → Customize → Site Identity first. Then it’ll show up automatically! ????
Hi Sandra! Yes, you can change your header color in Elementor Pro’s Theme Builder. Click on the header section → Style tab → Background. Choose a solid color or gradient. If you want it to change on scroll, you can use the ‘Sticky’ feature under Advanced → Motion Effects and set a different background for the sticky state. Hope that helps! ????
Hi Chira! You can add a mega menu in Elementor Pro by going to Elementor → Menus from the dashboard, or by using the Nav Menu widget and clicking ‘Edit’ next to the menu item. Check out my Elementor Pro tutorial on YouTube for a step-by-step walkthrough! ????