Anchor Link - top margin? - Forum | JoomShaper
Staff replied SP Page Builder

Anchor Link - top margin?

Asked by Josef 2 years ago Last activity 2 years ago

Is there a way to set the top margin of an anchor link for a row in the latest version of Helix Ultimate and SPPB?

I have a sticky header and would like to stop the new row below the sticky header.
Unfortunately, inserting an ‘invisible row’ does not look good in the result, the space between the columns is too large.

I have tried the following code in customs.css and entered it in the ‘css class’ field, unfortunately without success.

/ Klasse für Anker-Links mit oberem Rand /
.anchor-link {
scroll-margin-top: 50px;
}

entry in field css.class = .anchor-link
but it was ignore

5 replies

Pavel
2 years ago · edited

class = .anchor-link

Hi.

This is not right. You need to add just a class name, without any additional characters.

Only anchor-link.

But the use of an empty section (invisible row) is excessive and not flexibly. Just add RAW HTML addon where you need and insert an anchor element into it.

<div id="YOUR_ANCHOR" class="anchor-link"></div>

And it's better to use padding in your CSS.

https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-top

Or you can set Y position of RAW HTML addon with a negative value in each breakpoint (Advanced Tab) instead of using CSS

Rashida Rahman Staff
2 years ago · edited

Hi Josef,

Thanks for reaching out.

Yes, the scroll padding should be the best solution. Did you try that? Please let us know.

Best Regards

Rashida Rahman Staff

Hello Josef,

We are waiting for your response:)

Thanks!

Josef Asked this

Hi,

I had hoped for a more specific response style, but after some searching, I managed to implement the suggestion.
It's not running exactly as I want it to yet, but you can close the ticket.

kind regards
Josef

Rashida Rahman Staff

Hi Josef,

Thanks for sharing your experience with us.

You may accept the most useful answer in order to close the post:) You will find accept button at the bottom of each reply.

Best Regards

Log in to reply.