Questions tagged [scroll-margin-top]

4 questions
10
votes
1 answer

The scroll-margin-top property doesn't work when using a container with `overflow: hidden`

I have a problem with the css property scroll-margin-top (adds offset when scrolling to element on page). It's not working in all the cases, in particular, this case: when the elements with scroll-margin-top are inside a container with overflow:…
skalta
  • 1,033
  • 1
  • 7
  • 18
2
votes
2 answers

How does the CSS property "scroll-margin-top" and "scroll-padding-top" really works

At first, it looks simple, and at the end of scroll event, a margin (or padding) will be applied at the top. This is useful when there is a sticky element at the top. Then when a link is clicked and scroll down to somewhere on the page, it's nice to…
TigrouMeow
  • 3,669
  • 3
  • 27
  • 31
1
vote
2 answers

scroll-margin-top not working on textarea in chrome based browsers

On my page I have a fixed navigation bar, so I am using scroll-margin-top to avoid anchored jump targets to disappear behind the navigation bar. This is working fine with all elements, except for