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

HTML How to Make a Website CSS: Cascading Style Sheets Center the Wrapper

i can't understand paddin, margin, width, height etc

is there an easy definition for all of this, its getting complicated?

1 Answer

Jacob Herrington
Jacob Herrington
15,835 Points

What you are talking about is called the Box Model.

A lot of people don't like using W3Schools as a resource and prefer MDN or another site, but I this is one of the easiest-to-understand explanations of the Box Model that you can find.

My favorite part is right here:

  • Content - The content of the box, where text and images appear
  • Padding - Clears an area around the content. The padding is transparent
  • Border - A border that goes around the padding and content
  • Margin - Clears an area outside the border. The margin is transparent

Understand that computer programming is complicated! HTML/CSS are old technologies and they can seem hard to really grasp, but they are constantly evolving and becoming more modern (and in some cases more complex). If you are having trouble understanding, just slow down and find some extra time to practice the basics.