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
vy le oai
4,697 PointsProblem in understading background-position
I'm always facing problems with background-position. In this video, when he use percentage with background-position first, the background image edge is positioned 20% from the left and 50% from the top with white space created. But in the second example, when the background-image is positioned 50% from the left and 80% from the top, none space were created. All I mean is that the background image edge will change its position in relative with the element or the background image will move in relative with its current position?
2 Answers
Craig Watson
27,930 PointsHi :),
I'm not sure I can do a better job here to explain the background-position property better than MDN so I thought best I give you the link.
MDN Background Position CSS Propertiy
This link covers everything in detail with a couple of example to go with, I often find for some thing I need a read through info as well as the videos.
Hope this helps! Craig
vy le oai
4,697 PointsThank you very much for your help! :)