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

What does inline-block do in this case?

Hello,

At the end of video, he's got the display: inline-block; - But I delete it and put it back and both seems same effect. Why do we even need it?

@media (min-width: 769px) { .inln { width: auto; display: inline-block; } }

1 Answer

Steven Parker
Steven Parker
229,744 Points

It's not clear what course and lesson you are referring to. You might want to take a look at this video about Posting a Question.

But each element has a default display setting, the actual setting varies with the element type. And it could be that the performance of the default and "inline-block" are similar with the window sizes you are testing with. The setting might be intended to accommodate other sizes, or maybe even future styling that hasn't been added yet.

sorry I think I've override it to change to CSS. I'll make a new post in regards to that specific video. there will be a new 1