Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Medua Okonta
8,808 PointsResponsive background image
Is there a way I can make a background image responsive? I've tried a number of ways but haven't found a solution.
Is it possible in css or query?
4 Answers

Guil Hernandez
Treehouse TeacherCheck out this Quick Tip I did on full page background images. I also cover it in the CSS Deep Dive on background properties.

Chase Lee
29,275 PointsYou can do it in CSS by using a percentage value for the width
and height
, like this:
img{
width: 35%;
height: 20%;
}
Hope that helps.

Elliott Frazier
Courses Plus Student 9,647 PointsHere's a pen I did testing responsive images http://codepen.io/elliott/pen/eBFyq.
it might help. ;)

Medua Okonta
8,808 PointsThanks for the tips guys!