GolfGTIforum.co.uk

General => Site news and bright ideas => Topic started by: greencode on 16 April 2017, 13:48

Title: Images on mobile version of site get stretched
Post by: greencode on 16 April 2017, 13:48
Hi. Just thought you might like to know that when viewing the site using the mobile version, images are stretched and do not keep their correct ration. To resolve this you just need to add the following to the stylesheet (CSS):

.ui-mobile img {height: auto;}

Hope that helps.
Title: Re: Images on mobile version of site get stretched
Post by: jv on 18 April 2017, 11:00
Thanks - I can't get it to show stretched pages. For example, this page http://www.golfgtiforum.co.uk/index.php?topic=274783.980 looks as I would expect on Android on the full forum theme and the mobile theme. Got any examples?
Title: Re: Images on mobile version of site get stretched
Post by: greencode on 18 April 2017, 11:07
Thanks - I can't get it to show stretched pages. For example, this page http://www.golfgtiforum.co.uk/index.php?topic=274783.980 looks as I would expect on Android on the full forum theme and the mobile theme. Got any examples?

Hi. If you open up that page in an "incognito window" in the Chrome browser on your Mac or PC (just so you're not caching or viewing any old version of the page) and then view the mobile version of the page. You can drag your browser window in and out so you can see what it would look like on a mobile device. It looks like this…

(http://i746.photobucket.com/albums/xx104/greencode/browser_zpswzogs3of.jpg)
Title: Re: Images on mobile version of site get stretched
Post by: jv on 18 April 2017, 11:46
I see what you mean if you do that but on a mobile device it doesn't seem to. Images stay scaled correctly - why would that be?
Title: Re: Images on mobile version of site get stretched
Post by: greencode on 18 April 2017, 12:14
I see what you mean if you do that but on a mobile device it doesn't seem to. Images stay scaled correctly - why would that be?

On an iPhone it's exactly the same issue. TBH, What device are you using? It might be that the images are not wide enough for it to have any effect on your phone. If you add that code I mentioned to the stylesheet that'll resolve things (I'm a web developer btw)
Title: Re: Images on mobile version of site get stretched
Post by: Mr_Orange on 19 April 2017, 20:08
On my phone all forum images are stretched when holding phone in portrait. Hold phone in landscape, it auto-rotates and images display correctly.
Sony Android
Title: Re: Images on mobile version of site get stretched
Post by: greencode on 19 April 2017, 21:31
On my phone all forum images are stretched when holding phone in portrait. Hold phone in landscape, it auto-rotates and images display correctly.
Sony Android

Can you go to http://howbigismybrowser.com/ on your Sony device and let me know what the size of your browser is. Also, what page are you looking at in landscape where you say it's okay?
Title: Re: Images on mobile version of site get stretched
Post by: Mr_Orange on 22 April 2017, 07:10
360 x 512

All images on forum are OK in landscape ;-)