Scroll-Margin CSS Property (Not Working)

Hey there!

I have a couple of divs I’m trying to leverage the scroll-margin or scroll-padding CSS property for. Whenever I follow the guidelines it doesn’t work. If I use the CSS from css-tricks in sublime or webflow “scroll-margin” it displays in red font as if an error?

Is anyone able to implement this successfully?

6 Likes

Hello!
Did you ever figure this out? I’m trying to get scroll-padding-top to work with anchor links and for some reason it doesn’t work with webflow

2 Likes

Hello, did either of you ever resolve this?

I have the same problem: The CSS scroll-margin and scroll-padding properties are broken (or disabled) within Webflow. I’ve tried to implement them via custom code, and also tried via the Custom Attributes field under page/element settings tab, to no effect. Is this a known bug? Are there any workarounds that enable us to activate either of these standard CSS properties? (Context: I’m autogenerating side panel table-of-contents for blog posts with anchor links included, and need the targeted headings to line up below the navbar rather than at very top of screen covered by navbar).

@patina.photo @Kyle_Winton

Thanks!

Nope, I didn’t really solve it properly; I was able to hack it to be ‘good-enough’ with a before: element and negative margin.
But I hope webflow fixes whatever bug is making scroll padding/scroll margin not work properly.

scroll-margin or scroll-padding support would be really nice to have from Webflow. This would provide an easy to solution to a really annoying problem: jump/anchor links never scroll to the right spot in Webflow sites with fixed top nav. Been spending 2 hours trying to figure out a solution for this.

Same problem! Annoying that it doesn’t work with Webflow since my page heavily relies on anchor link navigation.