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

Design Web Typography Final Project: Create a Typographic Site Header and Summary

Stephanie Danne
Stephanie Danne
4,222 Points

Border-bottom instead of text-decoration: underline?

Hi, is there a special reason why the link is underlined with a border instead of the usual text-decoration property?

2 Answers

Zack Jackson
Zack Jackson
30,220 Points

The border-bottom will extend the entire length of the block element while the underline will just extend the length of the text. So if you add any padding to your link button for instance, the border-bottom would include the length of the padding too.

Stephanie Danne
Stephanie Danne
4,222 Points

Hi Zack, thanks for your reply. never thought about, but that make perfect sense.

thank you!