I would like logo.png only visible on mobile version
Amazing blog Joomla template for personal website with extensive features, additional typography and nice showcase of featured posts.
Rate this topic: 3.50 out of 6 based on 2 vote(s)
- GK User
- Sun Aug 17, 2014 10:45 pm
- Reply with quote
- Report this post
Hello everyone,
I am building a site from the publisher template and would like to have the logo appear only when the width of the device is small (smartphone layaout).
I have seen that the file decoration_left.png and decoration_right.png could disappear when we reduce the window of the navigator or if seen on a smartphone, that is great. And then, the logo.png stays in place.
What I would like to do is make the logo appear ONLY when decorations_left.png and decoration_right.png disappear, because I already have an instance of the logo in decorations_left.png.
Here is a link to the site : http://www.graphicom.tm.fr/oasis/
Thanks for your help.
Kris
I am building a site from the publisher template and would like to have the logo appear only when the width of the device is small (smartphone layaout).
I have seen that the file decoration_left.png and decoration_right.png could disappear when we reduce the window of the navigator or if seen on a smartphone, that is great. And then, the logo.png stays in place.
What I would like to do is make the logo appear ONLY when decorations_left.png and decoration_right.png disappear, because I already have an instance of the logo in decorations_left.png.
Here is a link to the site : http://www.graphicom.tm.fr/oasis/
Thanks for your help.
Kris
-
- Expert Boarder
- GK User
- Mon Aug 18, 2014 7:53 am
- Reply with quote
- Report this post
Please add this code to override.css:
- Code: Select all
@media (min-width: 581px) {
#gkLogo {display: none;}
}
-
- Moderator
- GK User
- Mon Aug 18, 2014 10:36 am
- Reply with quote
- Report this post
Great ! Thanks a lot. That works exactly like I wanted.
Because I love to learn and like to be able to do things by myself (and may be others), could you explain why the simple @media is enough to have it visible. Where is the condition (css, php ?) ?
Or is there a link to an article, a knowlege base... that explains that ? Because I guess it is not the same code for a template from another company.
Thanks for your time for sharing.
Kris
Because I love to learn and like to be able to do things by myself (and may be others), could you explain why the simple @media is enough to have it visible. Where is the condition (css, php ?) ?
Or is there a link to an article, a knowlege base... that explains that ? Because I guess it is not the same code for a template from another company.
Thanks for your time for sharing.
Kris
-
- Expert Boarder
- GK User
- Mon Aug 18, 2014 11:21 am
- Reply with quote
- Report this post
1. override.css in our templates is loaded as a last css file so declarations in it, whenever they are same as in any other css file - override other declarations, so if you see somewhere:
and paste into override.css:
the last one will be in use (no need for !important if it is not used in default declaration).
Now, if it goes to media - I have used chromedevtools to find out at what screen size decorations_left.png and decoration_right.png shows - it was at 581px, so I have created @media breakpoint that catches all screen sizes equal and above 581px:
This is something like css conditional. Now inside I have hidden logo element so it is invisible only for lower screen sizes.
If you want to know more, read about css3 media queries as there is a lot more to know .
- Code: Select all
#element {width: 100px;}
and paste into override.css:
- Code: Select all
#element {width: 10px;}
the last one will be in use (no need for !important if it is not used in default declaration).
Now, if it goes to media - I have used chromedevtools to find out at what screen size decorations_left.png and decoration_right.png shows - it was at 581px, so I have created @media breakpoint that catches all screen sizes equal and above 581px:
- Code: Select all
@media (min-width: 581px) {
}
This is something like css conditional. Now inside I have hidden logo element so it is invisible only for lower screen sizes.
If you want to know more, read about css3 media queries as there is a lot more to know .
-
- Moderator
- GK User
- Mon Aug 18, 2014 12:56 pm
- Reply with quote
- Report this post
That is a really a very efficient explanation. I will have a look at cc3 media queries.
Thanks a lot for your sharing.
Kris
Thanks a lot for your sharing.
Kris
-
- Expert Boarder
- GK User
- Mon Aug 18, 2014 5:06 pm
- Reply with quote
- Report this post
No problem.
Is there anything else I can help you with regarding this topic?
Is there anything else I can help you with regarding this topic?
-
- Moderator
- GK User
- Mon Aug 18, 2014 8:18 pm
- Reply with quote
- Report this post
Thanks nothing more. I just need some help on another problem on this template :
http://www.gavick.com/forums/publisher/unwanted-texte-under-the-search-zone-38638.html
http://www.gavick.com/forums/publisher/unwanted-texte-under-the-search-zone-38638.html
-
- Expert Boarder
- GK User
- Wed Aug 20, 2014 5:20 pm
- Reply with quote
- Report this post
Please check as bkrztuk mentioned - if your template isn't outdated.
-
- Moderator
8 posts
• Page 1 of 1