Bummer! You must be logged in to access this page.

Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

how to make anchor text more accurate?

Hello,

Anchor texts are very frustrating when you have a sticky header on your websites. How can I pinpoint exactly where I will scroll to once I click on the menu that is anchored? Or is it a constant guessing game?

Thanks!

1 Answer

Steven Parker
Steven Parker
243,228 Points

Don't the sticky elements have a specific size? I would think you could treat them as a reduction of the viewport size, and calculate positions accordingly.

Hi Steven,

Thanks for reply. Yes the sticky elements have a specific size. How do I incorporate this in the anchors?