Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make photos properly sized in img tag to fit proportional to the screen?

I have this photo page:

http://www.comehike.com/hikes/hike_image.php?hike_photo_id=106&photo_path=http://www.comehike.com/img/hiking_photos/-1_311_5/full_IMG_4612.jpg

As you can see, the picture is waaaaay bigger that the screen. Is there a way to downsize the photos to keep its proportions of length and width, but also to fit nicely on the page?

Thanks!

like image 545
GeekedOut Avatar asked Jun 06 '11 19:06

GeekedOut


1 Answers

Add width:100% to its style.


<img src="http://www.comehike.com/img/hiking_photos/-1_311_5/full_IMG_4612.jpg" style="border: none; width: 100%;" alt="California Nature" />
like image 142
kei Avatar answered Oct 05 '22 03:10

kei