1. jascanio
  2. Sherlock Holmes
  3. Commercial Templates
  4. Monday, 07 May 2018
  5.  Subscribe via email
Hi,
I'm trying to display different images when mi web is accessed from a mobile device.
These images are in an article. One image for desktop and a different image for mobile devices.
Thas anyone has any idea on how to achieve this?
Thank in advance for your help.
Regards,
Juan
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Juan

You can use the following HTML to display 2 images. One of which is hidden on desktop using the 'hidden-desktop' class. The other is hidden on phone and table using the 'hidden-phone' and 'hidden-tablet' classes...

Edit to taste replacing the # with the URL to your image

<img src="#" alt="mobile-image" class="hidden-desktop">
<img src="#" alt="desktop-image" class="hidden-phone hidden-tablet">


Ciarán
  1. more than a month ago
  2. Commercial Templates
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Ciarán,
Thanks for your reply!
Are hidden-desktop, hidden-phone and hidden-tablet template built-in classes, or should I declare them?

Thanks again,
Juan
  1. more than a month ago
  2. Commercial Templates
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Juan

Which template are you working with? Would you have a URL to an example of the article?

Ciarán
  1. more than a month ago
  2. Commercial Templates
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Ciarán,
I'm using Magnolia.
You can visit the article here

Regards,
Juan
  1. more than a month ago
  2. Commercial Templates
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
Thank you Juan

These classes are already declared in your template CSS so simply adding the classes to your HTML should be enough.

Ciarán
  1. more than a month ago
  2. Commercial Templates
  3. # 5
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Ciarán,
Thanks for your reply.
Regards,
Juan
  1. more than a month ago
  2. Commercial Templates
  3. # 6
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!

Join Our Newsletter

* indicates required
We respect your privacy and do not tolerate spam and will never sell, rent, lease or give away your information (name, email, number, etc.) to any third party. Nor will we send you unsolicited email.
Joomla51 - Mullaghmore, Co. Sligo, Ireland
Joomla51.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by
Open Source Matters
the trademark holder in the United States and other countries.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.

Ok