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

JavaScript

topSpacing - another way of determining spacing (tip)

Dave stated that he experimented with several numbers until he landed on 60 for the topSpacing.

It may also be helpful to inspect the header element when it is sticky. In my browser on my laptop, the height of the header element is 64. This number appears to work for me.

1 Answer

Hi Jason,

Yes that was my thought as well that the inspect element will get the exact number you are looking for. I believe that mine was 60 so exactly what Dave said it would be :)!

Thank you, Adrian