Help using Webflow navbar

Hi everybody,

I am reworking a website and have started with the navbar. Class naming is being done according to the BEM convention. Currently, the website shows 2 navbars placed on top of each other:

The top one is a Webflow navbar, selected from add elements → navbar.
In the navigator panel it is marked with a home icon:

Screenshot 2024-03-29 at 11.32.00

The bottom one is a navbar I made myself using div elements, and it does not have a home icon:

Screenshot 2024-03-29 at 11.32.11

The reason I have 2 navbars is because the Webflow navbar includes the “burger menu” (3 lines) and makes it easy to collapse the menu on mobile breakpoints, whereas my custom navbar did not do this out of the box. So basically - I want the layout of my custom navbar and the burger menu functionality of the Webflow navbar. To do this I added a Webflow navbar and assigned it all the classes of my custom navbar so that the 2 navbars become identical.

Both navbars have the exact same structure and same class names. Despite this, one observes that the Webflow navbar has a distinctly different layout than my “custom-built” navbar. And after thoroughly comparing styles, settings and checking for interactions I cannot find any differences! :sweat_smile:

However, I did notice this: On the published site, using the inspector, there are pseudo elements affecting the Webflow navbar. Specifically, one property called “content” seems to be the culprit.

If I uncheck content: " " then the two navbars match up identically. I’ve looked into removing this pseudo element using embedding but this does not feel like the right approach. There must be a simpler and better appraoch.

What am I missing here?
Thanks in advance! :slight_smile:


Here is my site Published
Here is my site Read-Only
(how to share your site Read-Only link)

hi @wellah The pseudo elements ::before and ::after are set in WF internally and these have nothing to do with your design or have any effect on it. Just ignore these.

If I understand correctly you would like to have top nav identical to bottom one. If this is correct here is a short video what need to be done.

Thank you @Stan for the reply :slight_smile:

This does achieve the desired look so thanks for that. However, I cannot understand why the 2 navbars are reacting differently when changing (i) the sizing to “grow if needed” and (ii) the gap. Since they have the same classes applied to them I expect them to both react the same way when changing such properties.

1 Like

hi @wellah I suggest the reason can be with flex behaviour in WF navigation and predefined values . :man_shrugging: