Hide modules

Commercial shopping Joomla template to easy create webshop with various extensions supported like ViruteMart, K2 and K2Store.
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Nov 13, 2013 3:23 pm
Reply with quote
Report this post
http://www.scriptureceramics.co.za/

Hi, I have 2 questions.

1. How do I hide a module in mobile and tablet view but NOT from desktop view?
2. My logo is NOT responsive, can it be and how do I do it?

Running the Joomla 3 template.

Thanks
User avatar
Expert Boarder

GK User
Wed Nov 13, 2013 5:24 pm
Reply with quote
Report this post
About showing and hidding modules on particular "devices" you can read here:
http://www.gavick.com/documentation/gen ... et-layout/
User avatar
Moderator

GK User
Wed Nov 13, 2013 5:27 pm
Reply with quote
Report this post
To make the logo responsive - you would need to use override.css and some media-queries - do you know anything about them?
User avatar
Moderator

GK User
Wed Nov 13, 2013 7:21 pm
Reply with quote
Report this post
Thanks, I managed to hide the module but don't know how to make the logo responsive...
User avatar
Expert Boarder

GK User
Sun Nov 17, 2013 10:38 am
Reply with quote
Report this post
Ok, then few words about media-queries.
They are used to apply custom css when browser size changes.
If you check your site sourcecode you will see this code:
Code: Select all
<link rel="stylesheet" href="http://www.scriptureceramics.co.za/templates/gk_storebox/css/small.desktop.css" media="(max-width: 1100px)" />
<link rel="stylesheet" href="http://www.scriptureceramics.co.za/templates/gk_storebox/css/tablet.css" media="(max-width: 1030px)" />
<link rel="stylesheet" href="http://www.scriptureceramics.co.za/templates/gk_storebox/css/small.tablet.css" media="(max-width: 820px)" />
<link rel="stylesheet" href="http://www.scriptureceramics.co.za/templates/gk_storebox/css/mobile.css" media="(max-width: 580px)" />


All it does - it loads additional css files when browser width is less than width given in max-width parameter.
So to make things short - you resize width down, with each step one more css is being used and overrides definitions implemented in previous ones (not all, just some).

So to create your responsive logo you could edit those css files, but when you will update the template one day it will cause some trouble.
Better way is to use override.css and media queries.

Code: Select all
@media (max-width: 8100px) {
#gkLogo.cssLogo {
background: transparent url('../images/logo-small-desktop.png') no-repeat 0 0;
height: 60px;
width: 408px;
}
}
@media (max-width: 1030px) {
#gkLogo.cssLogo {
background: transparent url('../images/logo-tablet.png') no-repeat 0 0;
height: 60px;
width: 408px;
}
}
@media (max-width: 820px) {
#gkLogo.cssLogo {
background: transparent url('../images/logo-small-tablet.png') no-repeat 0 0;
height: 60px;
width: 408px;
}
}
@media (max-width: 580px) {
#gkLogo.cssLogo {
background: transparent url('../images/logo-mobile.png') no-repeat 0 0;
height: 60px;
width: 408px;
}
}


What it does - it loads different image on every step. The only thing you need to do is to create different size logos with names given in background declaration, and override given width and height to make the logo smaller with each size step.

Whats more interesting - you don't need to create them all - You can skip any of media-queries resolution steps, this way "bigger" logo will work in as long as next media-query definition will not override it.
User avatar
Moderator

GK User
Thu Feb 13, 2014 4:09 pm
Reply with quote
Report this post
Hi there,

I'm trying to make my logo responsive with exactly the same way as you described, adding override on css and creating another image, but unfortunately it's not working. I have enabled the override on the template, i don't know what else i can do.
User avatar
Junior Boarder

GK User
Fri Feb 14, 2014 5:03 pm
Reply with quote
Report this post
You can share your site's url so I can check whats wrong ;).
User avatar
Moderator


cron