Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Anchor links scroll too far


BFGS

Question

Site URL: https://www.blackfishgoldstudios.com

I've designed a single-page / scroll website with anchor links that jump to page content in the always-present mobile menu. These links are held in the header of each section. When selected from the menu, the page jumps past the selected header and into the section content. Is there a way to make the jump more precise?

I've already tried adding a <span> above the header with the id placed therein. That did not alter the issue.

Much appreciated in advance!

Link to comment

7 answers to this question

Recommended Posts

  • 0

Hi! This solution does not work for me. Please help!

https://berkshireic-cms.squarespace.com/clients-services-fees 

password: BIC2021

 

Pinned sticky header using Tuanphan's code:

.Header.Header--top {
    position: sticky;
    position: -webkit-sticky;
    top: 0px;
    z-index: 1000;
    width: 100%; }

 

Using this from the previous solution does not work for me: 

:target:before {
content:"";
display:block;
height:120px; /* fixed header height*/
margin:-120px 0 0; /* negative fixed header height */
}

Link to comment
  • 0
On 5/12/2021 at 10:21 PM, kcasey said:

Hi! This solution does not work for me. Please help!

https://berkshireic-cms.squarespace.com/clients-services-fees 

password: BIC2021

 

Pinned sticky header using Tuanphan's code:

.Header.Header--top {
    position: sticky;
    position: -webkit-sticky;
    top: 0px;
    z-index: 1000;
    width: 100%; }

 

Using this from the previous solution does not work for me: 

:target:before {
content:"";
display:block;
height:120px; /* fixed header height*/
margin:-120px 0 0; /* negative fixed header height */
}

Hi. Where is anchor links?

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care - Learn CSS - Custom Popup - Testimonial Slider

I'm Tuan, blogger/owner of a free library for children in Vietnam. Helping the community is a hobby. Contact me via email.

Link to comment
  • 0
13 hours ago, kcasey said:

Hi @tuanphan, they're in the index section highlighted in blue. Thanks!

1410814194_ScreenShot2021-05-18at4_27_58PM.thumb.png.56c498795912c3ad47c1fa45bff60066.png

You can disable sticky header, or add a space above anchor title

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care - Learn CSS - Custom Popup - Testimonial Slider

I'm Tuan, blogger/owner of a free library for children in Vietnam. Helping the community is a hobby. Contact me via email.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...