bookmark issue

3 replies·opened Dec 10, 2021
T
TransmetronDec 10, 2021

Because of the "sticky menu header", when I use a bookmark, it does not show the first of the content.

I don't want to add white space to every place on a page where bookmarks are. Can CSS be modified that when a bookmark is used, it shows 3 or 4 previous lines, or shows up just below the "sticky menu header"?

Or, a better option?

Thanks for your help.

STEVE

S
SemiColonWebSTAFFDec 11, 2021

Hello,

You can consider using the following JS Code at the bottom of the Page just after the js/functions.js JS File Linking:

if( window.location.hash ) {
	window.scrollTo(0, 0);
}

jQuery(window).on('load', function(){
	var divScrollToAnchor = window.location.hash;

	if( jQuery(divScrollToAnchor).length > 0 ) {
		var t = setTimeout( function(){
			jQuery('html,body').stop(true).animate({
				'scrollTop': jQuery(divScrollToAnchor).offset().top - 80
			}, 700, 'easeOutQuad');
		}, 1000);
	}
});

This should work in the way you are looking for. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

T
TransmetronDec 13, 2021

Thank you for your response. I added the js code as you recommended, but that did not seem to make a change as you can see here:

https://www.uatests.com/customer-service.php#privacy

the "Privacy Policy" heading is under the sticky header.

Is there another option?

Thanks,

STEVE

S
SemiColonWebSTAFFDec 14, 2021

Hello,

The Codes appear to be fine but we have found some HTML Validation errors on your Page: https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.uatests.com%2Fcustomer-service.php which might be causing these issues. Please consider fixing these Errors and check this again as this issue should be automatically resolved. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard