Tagged: logo
-
AuthorPosts
-
May 3, 2019 at 8:37 pm #1097013
Hi there,
I was using this css you recommended to use a different logo for small screen.
https://kriesi.at/support/topic/using-a-different-logo-for-mobile-view/
@media only screen and (max-width: 480px) {
.logo img { opacity: 0; }
.logo a { background-image: url(https://kriesi.at/wp-content/themes/kriesi/images/logo.png); background-repeat: no-repeat; background-size: contain; background-position: 50% 50%; }}It worked. It doesn’t anymore. II didn’t notice when it stops working, but I presume since the last update.
Do you have an idea why
Thanks for your help.
Lex
May 4, 2019 at 5:04 am #1097051To see why your method does not work anymore – i have a guess.
The path to background-images on merged Enfold files (css an js) are wrong – that little bug will be corrected in the newest version to come – i guess. (4.5.7)
But you can download here on github a replacement file that fixed it : https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_4_5_5/Url_fix/asset-manager.class.php
( The file you had to upload it via ftp to : enfold ▸ config-templatebuilder ▸ avia-template-builder ▸ php )
After replacement i guess you have to rebuild the merged files on Enfold ( Child ) ▸ Performance ▸ Delete old CSS and JS files?
_____________
i would have done it by replacing the logo in this case and not changing display or opacity options.
if it is only for mobile – then you can use that snippet in child-theme functions.php from documentation
https://kriesi.at/documentation/enfold/logo/#use-a-different-logo-on-mobileif it is for small screens – even on desktop use:
function av_dif_mobile_logo(){ ?> <script> (function($){ $(window).load(function(){ if ($(window).width() < 480) { $(".logo img").attr("src", "http://kriesi.at/wp-content/themes/kriesi/images/logo.png");} }); })(jQuery); </script> <?php } add_action('wp_footer', 'av_dif_mobile_logo');
May 4, 2019 at 7:54 am #1097124@Guenni007
Thx Guenni for your feedback. As usual, very helpful and kind.
I will let you know.
Best
LexMay 4, 2019 at 2:26 pm #1097212Hi Lexa_Dryke,
Please let us know if you got it working for you or you need more help with it?
Best regards,
VictoriaMay 8, 2019 at 9:22 pm #1098597Thanks @Guenni007 – I just tried to apply the hotfix file from Github within my child theme. No success unfortunately.
The option which worked for me to have a different logo on mobile (png instead of svg) is the follow CSS snippet:
@media only screen and (max-width:976px){ .mobile-individual-logo { background: url('https://kriesi.at/wp-content/uploads/2019/04/Logo.png') center center no-repeat scroll; } }
Btw https://kriesi.at/documentation/enfold/logo/#use-a-different-logo-on-mobile did not work for me for some reason.
@Lex: Maybe this solution/workaround works for you as well – I hope so.
Best regards
MichaelMay 10, 2019 at 3:37 am #1099124May 14, 2019 at 3:49 pm #1100636Hi there,
FYI, the last update solved the problem. Everything is ok now. Thx for your time and your help.
Best
LexMay 15, 2019 at 7:08 am #1100844Hi Lex,
Great, I’m glad that the update solved your problem. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardMay 15, 2019 at 7:59 am #1100879Thx Rikard. You may close it. Best. Lex
May 15, 2019 at 2:37 pm #1101074Hi,
If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Using a different logo for mobile view – css not working anymore’ is closed to new replies.