• Hi @anlino
    I read this topic: https://wordpress.org/support/topic/smooth-scroll-offset-2/

    What about modifying the js in this way:

    --- construct.js	2021-05-09 14:43:50.287212718 +0200
    +++ construct_patched.js	2021-05-09 15:17:15.485021895 +0200
    @@ -644,6 +644,11 @@
     				additionalOffset 	= $clickElem.data( 'additional-offset' ) ? $clickElem.data( 'additional-offset' ) : additionalOffset,
     				scrollSpeed 		= $clickElem.data( 'scroll-speed' ) ? $clickElem.data( 'scroll-speed' ) : scrollSpeed;
     			}
    +			// Respect css scroll-margin-top
    +			if ( $target && $target.css("scroll-margin-top") ) {
    +				var scrollMarginTop = parseInt( getComputedStyle($target[0]).getPropertyValue('scroll-margin-top'), 10 );
    +				additionalOffset = additionalOffset - scrollMarginTop;
    +			}
     
     			// Determine offset
     			var originalOffset = $target.offset().top;

The topic ‘smooth Scroll offset – respecting scroll-margin-top’ is closed to new replies.