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

CSS

Reducing Photo size

Hi, I am playing around on workspaces making a website. I have uploaded photos onto it. How do I use css to reduce the photo size as they are currently taking up the whole page? Do I use a max-width for each image?

2 Answers

Cisco Rendon
PLUS
Cisco Rendon
Courses Plus Student 37,899 Points

Hey tracy,

Don't use max width, all you are going to do is make it stretch across all platforms. Not the best way of resizing the images. The best way to resize all images is in a separate cascading style sheet, css page referenced in your header html section.

Now there are a boat load of ways you can resize your image, but as you learn you will see more than one way. First thing I would do is give them all individual class id's then use the "width" , "height" of a certain portion. Make sure to inline block them so they are on the same row.

Hope this helps out... Have fun building

Thank you

Cisco Rendon
PLUS
Cisco Rendon
Courses Plus Student 37,899 Points

Not a problem... If you have any questions, please feel free to ask away. You can follow on facebook where I will start putting up little tips and tricks very shortly... Have a great day =)