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 Column Layout with Inline-Block

Paolo Di Pasquale
Paolo Di Pasquale
4,251 Points

Negative margin to be applied doesn't seem to be based on font-size

Hi, I have just watched the video for "Column Layout with Inline-Block". During the video Guil explains that when using the inline-block value to create a column layout, a negative margin must be applied in order to cater for the white space issue. Guil said that the negative margin that needs to be applied depends on the font-size, however, this does not seem to be the case. I created this CodePen to illustrate http://codepen.io/pdp/pen/AFqhv.

Changing the font size of the element doesn't seem to make any difference to the negative margin that needs to be applied. Can anyone shed any light on this?

3 Answers

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Hi Paolo Di Pasquale,

Take a look at this related forum thread. It should answer your questions about inline-block and negative margins. :)

Paolo Di Pasquale
Paolo Di Pasquale
4,251 Points

Thanks guys for your useful suggestions, much appreciated.