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!
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

Mani Saini
3,101 PointsImage Sizing
The Images used in this project are 1024 * 768 pixels. If i want to use any other pics in my website then how do i change the size of the image? Any Recommended application?
2 Answers

Daisho Komiyama
15,906 PointsYou would want to paste your code next time because it helps us a lot to understand what you want to know.
You can give a class to the img tag then set width: 600px; or any width you want in CSS file.
in html file
<img class="my-pic" src="images/my-pic.jpg">
in css file
.my-pic { width: 600px; }

Daisho Komiyama
15,906 PointsYes, you can resize images according to the need. You can use an ID instead of a class, but IDs are mostly used in JavaScript to give interactions by convention. I recommend you use classes for styling purposes.
Mani Saini
3,101 PointsMani Saini
3,101 PointsHi Daisho, Thanks for explaning. There is nothing that i was trying to do at this stage. I just had this question in my mind so when i do create my own site i can resize images according to the need. Can you explain why we need to use class instead of ID here?