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 How to Make a Website CSS: Cascading Style Sheets Take a Mobile-First Approach

what is the purpose of margin in this video?

Why do we need margin for #logo in this video?

I coded my logo with and without the 'margin:0', and they still look the exact same. Then what is the point of putting 'margin:0' for the logo in this video?

4 Answers

I believe they are just trying to teach how margin works on a website.

In this case, the default margin must be 0, so changing it to 0 probably does nothing.

thank you for the quick reply! :)

thank you for the quick reply! :)

David Abrantes
David Abrantes
1,064 Points

Hi,

Try to set it to 10px and then to 20px. The result is really weird. 10px or 20px gives the same result. I can't understand why.. ???!?

Plus, if you add some background color to the a elements, all a elements change color but the "Nick Pettit" and "Designer" ones.

Does anyone know what's going one?

thanks in advance