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.

Tony Helsel
337 PointsHow do i make an image smaller on my webpage
How do i make an image smaller on my webpage right now it is very big and it puishes everything around
4 Answers

Damien Watson
27,419 PointsAs mentioned width and height, but a lot of responsive sites these days will use max-width which means that the image will not push out of its container and push things around.
img { max-width:100%; }

james south
Front End Web Development Techdegree Graduate 33,258 Pointsyou can set the size with css, width and height.

Trevor Johnson
14,427 PointsYou can set the size by creating a class for the image.
.img {
width: 200px;
height: 200px;
}
If you are using bootstrap you can use the ".image-responsive" class too.

quincy ganious
1,972 Pointsstill does not work for me for some weird reason. this is my code just for testing it out i wanted to start small and i also wrapped the images with <div class="img"> </div> and its still acting up
.img { max-width: 40; max-height:40;
}