nav-link-custom
) on link blocks instead of styling the base element to avoid w-current
overriding styles.w-current
behavior by applying layout styles directly in the custom class, using a combo class or custom CSS if needed.The w-current
class in Webflow is a built-in class automatically applied to elements like link blocks when they match the current page or anchor. It often overrides custom styles—especially layout properties—if not handled properly.
w-current
w-current
applies styles automatically when a link block points to the currently active page or section.w-current
may override this if it has conflicting styles set via Webflow Designer.w-current
directly — it's contextually applied using the base link class.w-current
states.nav-link-custom
) to the link block, and define height and other layout properties there.All Link Blocks
globally unless intentional.nav-link-custom
).w-current
may override them.w-current
behavior, you can use a combo class that includes both your custom class and the hovered w-current
(applied by Webflow).nav-link-custom w-current
in the Style panel (just select an active link and add your custom class).w-current
state.If Webflow's Designer won’t let you override w-current
, use small custom CSS in the Page Settings > Before
tag to target it:
Example:<style>.nav-link-custom.w-current { height: 60px !important; }</style>
Be sure to use !important
only when necessary, and test across all breakpoints.
To prevent w-current
from overriding your custom link block height, apply a custom class directly to the element, avoid styling the base link block, and optionally use a combo class or custom code to enforce your height styling across all states.