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 Challenge

Nikolay Batrakov
Nikolay Batrakov
9,604 Points

negative margin to remove space between inline blocks

Hello everybody and let me tell that new course by Guil is pretty exiting for me. It is going to be that everything sets to a whole picture in my dump head. But there are little scratches. Below is one of them, pls explain:

  1. how can we calculate the exact negative margin value that should be implemented to remove extra white space? It is depend of font size sure, but shell we just "try and buy" or it can be some sort of formula? I just figured out that it should be some 25% of font size.

  2. is it a "good' method as we can obviously try to avoid pixels?

1 Answer

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Nikolay Batrakov,

Take a look at this related forum thread. I link to 3 demos I that show the differences in margin values and font-sizes. :)