Provided that the site’s structure is quite clean — with the Navbar element directly under the body, and the targeted section at the same level (yours seems very fine) — this ↓ used to be the solution you are looking for.
However, it doesn’t seem to work anymore. I tested it on a new site and I can’t figure out if the feature is broken or if I don’t really remember what it’s for. I was talking about this feature in a blog post ↓ with screen capture of the effect so I think it was still working not too long ago.
I told @Brando about this, he will let us know what’s going on. (thanks @brando!)
As for now, you still have ways to hack it to get the desired effect:
Your navbar is 100px height:
- Remove the IDs from the sections, and give them
- Place an
height:1px``position:absolutediv inside of your targeted section.
- Stick it to the top and offset it 100px downwards.
- Now give this div the targeted ID that was on the section before
Now it does what you wanted.