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
Mostafa M.
4,862 PointsThe margin between a text and an element
How do we start calculating the space under or above the text,

Mostafa M.
4,862 PointsBut i made a markup to be sure,

Guil Hernandez
Treehouse TeacherI thought you were referring to line height in lines of text, which would look something like this:

With headings or blocks of text, then yes, if you add margins or a bg color (as you did), it will affect the entire element's "box."
2 Answers
James Barnett
39,199 PointsI think it's from baseline down and from x height up
James Barnett
39,199 PointsI think it's from baseline down and from x height up
Guil Hernandez
Treehouse TeacherGuil Hernandez
Treehouse TeacherMostafa Syam,
James' answer is correct. :)