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!

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

Questions for in-line block for this course

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


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
.a{fill-rule:evenodd;}techdegree seal-36
Bella Bradbury
Front End Web Development Techdegree Graduate 32,070 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!