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 trialChris Huxtalble
1,514 PointsWhen I add a margin of 10px on the bottom of the a elements, I don't see an increased space between the lines. Why?
My code is exactly the same as far as I can tell but no matter what margin value I put in, it seems to have no affect on webpage. Not sure what's going on.
2 Answers
Austin Whipple
29,725 PointsIt would be helpful to see the code, but I suspect it's due to the fact that <a> elements are, by default, inline elements rather than block-level elements. This produces strange or no results when trying to apply top and bottom margins and other properties.
Try this and see how it goes:
a {
display: block;
margin-bottom: 10px;
}
Calvin Stiff
501 PointsI had this same problem, turns out I was missing a ':' after margin thus the code was ignored completely.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Chris,
Can you post that portion of your css?