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 CSS Selectors Selectors - Beyond the Basics DRY CSS

Peter Huang
Peter Huang
3,590 Points

Questions for in-line block for this course

What does inline-block do in this case? at 9:40 in the video

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

Bella Bradbury
seal-mask
.a{fill-rule:evenodd;}techdegree
Bella Bradbury
Web Development Techdegree Student 12,629 Points

Hey Peter!

As you can see at the end of the video, in this particular instance he's using inline-block to display the buttons at the bottom of the form differently depending on the screen size. Without changing the display, the buttons would not show up next to each other on larger screens. I'm not entirely sure why it would have the same effect if you comment the line out unless you've not refreshed the page or have inserted another line in that would achieve the same effect. Remember to save and refresh the page after each change to see it take effect on the page itself!

If you'd like to learn more about inline-block, below are some great articles!

Happy coding!