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

Jonmarc Stevens
6,414 PointsStop Background Image from Stretching
Hey everyone,
Is there a way to keep a background image from stretching too much? Here is my css for my background image:
background-color: #a1c7dd;
max-width: 100%;
background-image: url("Netsoft_body_photo.jpg");
background-position: center;
background-size: 100% 100%;
background-repeat: no-repeat;
I would like to make it responsive so that it will not stretch after it reaches a certain size.
1 Answer

Jonmarc Stevens
6,414 PointsThanks man! It worked out!

B Green
13,636 PointsAwesome! Glad to hear it! :)
B Green
13,636 PointsB Green
13,636 PointsHey Jonmark! I would use the following: