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

CSS

Jonathan Edwards
Jonathan Edwards
9,097 Points

Why did he use the box-shadow property to make a border?

Is there an advantage to creating this with the box-shadow property instead of the border property?

Max Senden
Max Senden
23,177 Points

Hi Jonathan,

Could you provide us with a link to the video? There could be a myriad of reasons why one would decide to use box-shadows over borders and vice versa.

2 Answers

Daniel Newman
Daniel Newman
5,995 Points

Most likely it was done because using a box-shadow creates a more "gentle" border than using a 2px solid line or something of that nature. Probably just more asthetically pleasing.