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 trialbabasariffodeen
6,475 PointsWhy did we apply display block to '.contact-info a'... Why not use inline-block? What's the difference!? I am confused
.contact-info a { display: block; /* display is block, so that it will take up space? */ }
Can anyone please explain why we do this, and why use block over inline-block... Nick says its used so that it will take space. Can anyone elaborate please? Thanks
1 Answer
Steven Parker
231,275 PointsExplicit size settings are ignored on flowed elements, that's the reason to set the display mode. Of course, flowed elements still "take up space", but you can't control that space the same way. I'm not sure, but perhaps that's what he meant.
A value of "inline-block" would be a good choice if you wanted the items to share the same line, but in this case "block" is chosen to place each one on a separate line.