1. kpomilla
  2. Commercial Templates
  3. Tuesday, 26 July 2016
  4.  Subscribe via email
I'm using the Ashley template and I have header-1 and header-2 modules, that look perfect on a desktop. I've hidden the two modules for mobile devices; what I want is to utilize a second header-1 custom html module (a call now button) that only shows on mobile devices. How can I make this happen?

See the attached screen grabs (both full screen and mobile). Preferably, I'd like the call now button to appear at the top on the hornav...

Thanks in advance for your help.
Accepted Answer Pending Moderation
0
Votes
Undo
Hello

Would you have a URL to an example of your modules?

Ciaran
  1. more than a month ago
  2. Commercial Templates
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
http://thewebstoretest.com/basketcase/index.php

I have set the call now module to published for now...it shows on a computer, but doesn't show on mobile devices. I don't know how to distinguish between headers and make one visible on mobile devices and one not visible. Add to that, I don't want the call now button visible to desktop/laptop users.

Thanks for your help
  1. more than a month ago
  2. Commercial Templates
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Hello

You appear to have the following in your Custom CSS which will hide your header positions depending on the vertical height of the screen. I suspect this is why you cannot see the module on mobile devices due to the smaller screen height...


@media only screen and (max-height: 700px) {
/* Hide default hornav menu */
.header-1 {display:none !important;}
.header-2 {display:none !important;}
.newmodule {display:block;}
.visible-phone {
display: none !important;
}


To hide a particular element on a mobile device try adding the 'hidden-phone' class name to it.

Ciaran
  1. more than a month ago
  2. Commercial Templates
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
I removed the section of css, then added the class hidden-phone to the header-1 module (text) and then I added the class visible-phone to the call now button but still no luck.
  1. more than a month ago
  2. Commercial Templates
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
Hello

I am unable to see the class names in your website source. To add the class to the entire module you can use the 'Module Class Suffix' field (http://www.joomla51.com/tutorials/item/hide-a-joomla-module-on-mobile-devices).

Alternatively the class can be added to individual items like so...


<img class="hidden=phone" style="display: block; margin-left: auto; margin-right: auto;" alt="callnow" src="/basketcase/images/callnow.png"> 


CiarĂ¡n
  1. more than a month ago
  2. Commercial Templates
  3. # 5
  • 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