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

iOS

Responsive website images not being responsive on an iphone

I am using bootstrap in my aspx pages. When I access my site via android, or windows phone, the images scale down as expected. When I access on an iPhone, the images don't shrink and all I see is a section of the image. Any reasons why this could be happening?

3 Answers

Brandon Crane
Brandon Crane
13,328 Points

Have you applied "img-responsive" classes to your images? Also, make sure your parent container doesn't have a fixed height?

Oops! That was it. Thanks!

Matthew Bingham
Matthew Bingham
11,927 Points

You could try using webkit media queries to target iPhone users. CSS tricks has a good article and example code: http://css-tricks.com/snippets/css/media-queries-for-standard-devices/

Matt

Awesome, Ill check that out.

Matthew Bingham
Matthew Bingham
11,927 Points

No problem - you might also want to check that you have you used device width, initial scale=1 in your meta - some mobile devices sometimes rescale their viewings…

Matt