Support Forum

  • Page:
  • 1

Replace an image on small device

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hi!
Could you tell me how to replace an image on small device using CSS?
I wish to use something like this:

@media screen and (min-width: 280px) and (max-width: 360px){

p.zen-center img:before {
content: url(www.mysite.it/images/css3.jpeg) !important;
}

}

Original code is:

replace-an-image.jpg



Thanks!
  • mikyilfilosofo's Avatar
  • mikyilfilosofo
  • 6 Month Developer
  • 419 posts
  • Karma: 0
The administrator has disabled public write access.
Hi,

With css you can only really replace css images (backgrounds).

I think you may need to use javascript to swap the href attribute value.

Regards,

Rob
  • Robert Went's Avatar
  • Robert Went
  • Moderator
  • 2210 posts
  • 196 Thanks
  • Karma: 90
The administrator has disabled public write access.
If you are using buildr then there is an element for a mobile logo that you can drag into the layout.
  • Robert Went's Avatar
  • Robert Went
  • Moderator
  • 2210 posts
  • 196 Thanks
  • Karma: 90
The administrator has disabled public write access.
Thanks!
Yes, I'm using Highline2 template. Can you tell me how to do this that you say?
Is there a documentation?
  • mikyilfilosofo's Avatar
  • mikyilfilosofo
  • 6 Month Developer
  • 419 posts
  • Karma: 0
Last Edit: 7 years 4 months ago by mikyilfilosofo.
The administrator has disabled public write access.
Hi!
I would like also to report a series of errors like this, every time I go into an article (Highline2):

User-error.jpg


User-error2.jpg



Thanks!
  • mikyilfilosofo's Avatar
  • mikyilfilosofo
  • 6 Month Developer
  • 419 posts
  • Karma: 0
Last Edit: 7 years 4 months ago by mikyilfilosofo.
The administrator has disabled public write access.
Hi,

The demo content of a quickstart package is created under the id of one user.
When you install the package, in joomla 3, the new user id is created randomly.
This leads to the messages you are seeing.


You can either delete the demo content, or change the author to an existing profile.

Regards,

Rob
  • Robert Went's Avatar
  • Robert Went
  • Moderator
  • 2210 posts
  • 196 Thanks
  • Karma: 90
The administrator has disabled public write access.
Ok! Thanks!
Can you tell me how to set the element for a mobile logo that you can drag into the layout?
Is there a documentation?
Thanks!
  • mikyilfilosofo's Avatar
  • mikyilfilosofo
  • 6 Month Developer
  • 419 posts
  • Karma: 0
The administrator has disabled public write access.
Not specifically

The mobile logo is in the toolbar row if you are looking for the drag and drop module
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
As the logo is a module you could add a responsive class to hide it and have a different module set to display using a different responsive class

And not use the mobile logo at all

Cheers
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
For info on that there is

docs.joomlabamboo.com/zen-grid-framework-4/responsive/responsive-module-classes

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
The following user(s) said Thank You: mikyilfilosofo
Thanks! Now I try your instructions...
  • mikyilfilosofo's Avatar
  • mikyilfilosofo
  • 6 Month Developer
  • 419 posts
  • Karma: 0
The administrator has disabled public write access.
Best of luck with it

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Hi!
It was very simple. I duplicated the logo module and I assigned it the alternate image. Then, using two custom classes in the "advanced" tab of the modules, I hid the logo should not to appear depending on the width of the screen.
It works well!
Thank you very much!
Regards
  • mikyilfilosofo's Avatar
  • mikyilfilosofo
  • 6 Month Developer
  • 419 posts
  • Karma: 0
The administrator has disabled public write access.
You're welcome

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers