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 Layout Techniques Display Modes Display Modes Review

3 Answers

The correct answer is the one about line-breaks and tabs.

Basically, with inline and inline-block elements, if there is a new-line, a space or a tab between the tags are actually applied in the document - and are not removed. This happens for the same reason a regular space between words works.

Look at this demo: https://jsfiddle.net/mn4z39ss/1/

The first 2 boxes are coded as:

<span></span>
<span></span>

So 2 spans, each on a new line.

However if there is no new-line/space/tab there isn't any space! Did you notice how the same exact code worked for the bottom 2 boxes that were on ONE line?

<span></span><span></span>

This is can sometimes be frustrating because you typically use new-lines as a way to indent your code so that it looks organized and easy to read.

Glad I could help.

Loren Cardella:

Here's a link on inline & inline block elements: http://www.w3schools.com/htmL/html_blocks.asp.