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
Kelvin Atawura
Front End Web Development Techdegree Student 19,022 Pointscss unit for responsive images
what css units is best for images that you want to look resposive and good on all devices?
1 Answer
Varuzhan Darbinyan
8,360 Points%. they will scale depending on parent element size :)
Adam Jarrell
8,817 PointsAdam Jarrell
8,817 PointsI believe you can set the max-width property to a percentage value to allow the images to scale to whatever the width of their parent element is. I think you'll have to include media queries in order to scale the parent elements to different screen widths for different devices.
This is the Mozilla Developer network link on the 'media queries' topic could be useful.