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 trialAustin Erb
6,827 PointsWhen a insert the image element as a link, the image extends beyond the element it's inside of. Why is this happening?
The image extends beyond to the right, touching the card to the right.
1 Answer
behar
10,799 PointsHey Austin! When you add an image to your webpage it will be dispayed at whatever size the image originally is. If its 500px high and 400px wide, it will be displayed as so. In CSS which you will learn about later, you can set the elements width and height, and style it however you like. However if your desperate to do it now, you can add a height and width attribute to your image tag in html like so:
<img src="test" height="100px" width="200px">
(px for pixels) Hope this helps!