Menu icon Foundation
Shadow on Sticky Bar When Active?

Hey, guys!

First off, I've got to say this forum is an amazing resource, so thanks to everybody for making it great.

I'm trying to figure out a way to add a bottom shadow (or border) to the sticky top bar that appears only once it's stuck at the top. I saw someone mention jquery in a forum for another framework, but haven't been able to find any other info. Any ideas how this could be implemented?

Thanks in advance for any info!

top barstickyshadowborder

Hey, guys!

First off, I've got to say this forum is an amazing resource, so thanks to everybody for making it great.

I'm trying to figure out a way to add a bottom shadow (or border) to the sticky top bar that appears only once it's stuck at the top. I saw someone mention jquery in a forum for another framework, but haven't been able to find any other info. Any ideas how this could be implemented?

Thanks in advance for any info!

Rafi Benkual about 4 years ago

When top-bar is sticky (when the nav is at the top of the browser window) a class of .fixed is added by the JS.

You can style the .fixed class with the box-shadow.

Scott Haney about 4 years ago

Ah! That makes perfect sense. Should've been so simple to figure out. Many thanks for the info, Rafi.