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
Anthony Lockett
24,266 PointsNav Link Box Shadow
Does anyone know how to apply a box shadow to a nav link? Every time I try it puts a box around the a link and applies the box shadow to that, instead of the text itself which is what i'm looking for.
2 Answers
Chris Shaw
26,676 PointsHi Anthony,
The box-shadow property isn't designed for text, instead what you're looking for is the text-shadow property which I've linked to below.
The main difference is box-shadow applies to the entire outside/inside of a block level container whereas text-shadow applies only to the text node and nothing outside of it.
https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow
Anthony Lockett
24,266 Pointsthanks! I just realized that before looking at this, thanks for the quick reply!
Steve Dirsa
12,584 PointsSteve Dirsa
12,584 PointsAssuming the link is text, try text-shadow.