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 Adding Pages to a Website Add Iconography

the padding

if the " background image " and the " anchor " are one thing, then why when we added the padding to the anchor, it has been applied to the text only, why the images didnt indent with the text ?!

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

I think what background-image and anchor share is that they are only as big as the content that is within then. Anchor is an inline image and a background image doesn't appear in markup at all and is as big as the size it is given in CSS width and height,.

So the padding just adds a bit of extra size between the content the content and border layer of the element.

I hope I understood you correctly and this helps you :)

ok so if I get it right, the padding will only push away the text from the content, i.e if we want to apply the padding to the images, we couldnt do so, since the padding could only affect the text !?

ok so if I get it right, the padding will only push away the text from the content, i.e if we want to apply the padding to the images, we couldnt do so, since the padding could only affect the text !?