Size picture on mobile version different from desktop version

  • info5
    Active member
  • Topic Author
  • New Member
  • New Member
More
1 year 2 weeks ago #50931 by info5
Hi,

see for instance  www.automation-magazine.be/index.php/nl/...otion-bezoekt-soudal . The size of the picture on the desktop version is the same as on the mobile version. However, it's way too big for the mobile version. Mobile and desktop version seem to use the same custom.css stylesheet. Is there a way to resize the pictures for only the mobile/responsive version?

Thanks,

BC

Please Log in to join the conversation.

  • milos
    Support Staff
  • Moderator
  • Moderator
More
1 year 2 weeks ago #50932 by milos
Hello,

You set the width of the image explicitly to 1280px. This value is for all devices, it can't be different. Therefore, it's not recommended to set the image size like this.

However, you can edit the file /media/templates/site/newsportal/css/custom.css and change this (around line 419):
Code:
.item-image img, .newsflash img { border-radius: 5px; }

to this:
Code:
.item-image img, .newsflash img { border-radius: 5px; max-width: 100%; }

Regards,
Milos

Please Log in to join the conversation.

  • info5
    Active member
  • Topic Author
  • New Member
  • New Member
More
1 year 2 weeks ago #50933 by info5
Hi,

we actually do not explicitly set the image size, the image is just added in the Joomla article editor and that apparently automatically adds the picture's size.:

images/apex.jpeg#joomlaImage://local-images/apex.jpeg?width=640&height=360

I added your CSS code and this seems to work, thanks for that!

BC

Please Log in to join the conversation.

Time to create page: 0.254 seconds
Powered by Kunena Forum