Author Topic: Images on mobile version of site get stretched  (Read 4044 times)

Offline greencode

  • Here all the time
  • ****
  • Posts: 328
  • Golf R - Pure White
Images on mobile version of site get stretched
« 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.

Offline jv

  • Administrator
  • Serious forum addict
  • *****
  • Posts: 7,126
  • Location: Cambridge
  • Anyone seen my Rallye?
    • GolfGTI.co.uk
Re: Images on mobile version of site get stretched
« Reply #1 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?
Buy site stuff!
GolfGTI.co.uk - merchandise

Support the forum charity!
Forum Charity

Interact!
On Facebook

Offline greencode

  • Here all the time
  • ****
  • Posts: 328
  • Golf R - Pure White
Re: Images on mobile version of site get stretched
« Reply #2 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…


Offline jv

  • Administrator
  • Serious forum addict
  • *****
  • Posts: 7,126
  • Location: Cambridge
  • Anyone seen my Rallye?
    • GolfGTI.co.uk
Re: Images on mobile version of site get stretched
« Reply #3 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?
Buy site stuff!
GolfGTI.co.uk - merchandise

Support the forum charity!
Forum Charity

Interact!
On Facebook

Offline greencode

  • Here all the time
  • ****
  • Posts: 328
  • Golf R - Pure White
Re: Images on mobile version of site get stretched
« Reply #4 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)

Offline Mr_Orange

  • I live here
  • *****
  • Posts: 2,100
  • Location: Ale town, Kent
  • MK4 GTi Turbo Exclusive 150 AUM
Re: Images on mobile version of site get stretched
« Reply #5 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


Build thread clicky

Offline greencode

  • Here all the time
  • ****
  • Posts: 328
  • Golf R - Pure White
Re: Images on mobile version of site get stretched
« Reply #6 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?

Offline Mr_Orange

  • I live here
  • *****
  • Posts: 2,100
  • Location: Ale town, Kent
  • MK4 GTi Turbo Exclusive 150 AUM
Re: Images on mobile version of site get stretched
« Reply #7 on: 22 April 2017, 07:10 »
360 x 512

All images on forum are OK in landscape ;-)


Build thread clicky