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 CSS Basics (2014) The Box Model Display Values

Michał Gonciarz
Michał Gonciarz
13,549 Points

Why inline in h1 makes span and h1 inline?

Why display mode "inline" for h1, makes span and h1 after it, in one line? I thought it works only for selected element - h1.

1 Answer

Hi,

The span element is already inline so applying it to the h1 will convert it from a block element to inline and therefore move the span up next to it.

Hope that makes sense :)

-Rich

Michał Gonciarz
Michał Gonciarz
13,549 Points

Thanks for answer, I need to get back to it and check that out :)

No problem :)