Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,153 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.