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 How to Make a Website Adding Pages to a Website Add Iconography

.contact-info a {display: inline-block; } so I can apply height to the a element, but avoid the block element behaviour?

Is it ok to substitute "display: inline-block" so I can still apply height to the "a" element, but avoid the block element behaviour, allowing the active link area to remain wrapped around the icon + text?

Thanks

Mike

2 Answers

I don't see anything wrong with using "inline-block" on the anchor tag at all. There aren't many cases where it would break the behavior.

If you would show us the code you're working on, we might be able to help. I whipped this up to illustrate the difference for you:

display examples on codepen.io

Hope it helps!