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

Peter Huang
Peter Huang
3,590 Points

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
218,596 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.

Peter Huang
Peter Huang
3,590 Points

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