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.

CSS

Nirmal Budhathoki
Nirmal Budhathoki
1,271 Points

Regarding @media Scree and (min-width: 600px) { }

.small-img doesn't change as it showed in video lecture. my code is exactly same as in video but when I view my page less than 600px, small-img (image still not display 1oo%)

here is the pic of my code

/* Small device less than 600px */

.small-img { width: 100%; }

/larger device more than 600px/ @media screen and (min-width: 600px) { .small-img{ float:left; width: 300px; margin: 0 1rem 1rem 0; } .clear{ clear:both; } }

please help me out to understand what's the issue.

1 Answer

Jassim Alhatem
Jassim Alhatem
20,859 Points

Hello Nirmal Budhathoki,

Do you have the class small-img assigned to the 'img' element?

if not just add it to the element, and everything will work out. :)