Tagged: x
-
AuthorPosts
-
August 3, 2016 at 1:00 am #1114971
Jacob DParticipantDespite trying several suggestions on archived threads, I’m unable to get an alternate logo to load when viewed on mobile phones. The current logo looks great on desktops and most tablets, but on phones the wide version doesn’t play nice, so I was wanting to get a more compact, stacked version to sit next to the mobile menu. Below is the latest iteration of code which I pulled from the forums here in some archived threads, but I’m yet to get it working, so I’m not sure if something in X has changed since this solution was provided or if I’ve just managed to bork it up.
@media screen and (min-width: 980px){ .x-brand img { background-image: url("http://cerulean.pmcgdev.com/wp-content/uploads/2016/06/cer-2016-wide-logo.png") !important; /* this is responsive, or background-size:100% auto; */ background-size: 100% 100%; background-repeat: no-repeat; } } @media screen and (max-width: 979px){ .x-brand img { background-image: url("http://cerulean.pmcgdev.com/wp-content/uploads/Cerulean-Mobile-Logo.png") !important; } }The dev site is viewable here: http://cerulean.pmcgdev.com/ so any advice anyoen might have would be greatly appreciated!
August 3, 2016 at 5:10 am #1115182
ChristopherModeratorHi there,
Please try this code :
@media (max-width:979px){ a.x-brand.img { background-image: url("http://cerulean.pmcgdev.com/wp-content/uploads/Cerulean-Mobile-Logo.png") !important; width: 67%; display: inline-block; background-size: contain; height: 50px; background-repeat: no-repeat; } x-brand img { display: none; } }Hope it helps.
August 3, 2016 at 12:08 pm #1115694
Jacob DParticipantThank you for the reply! I dropped that in and am still seeing the wide logo both in X’s mobile preview and on my mobile device, despite refreshing and clearing my cache.
August 3, 2016 at 12:51 pm #1115771
ThaiModeratorPlease delete the previous CSS.
And try with this instead:
@media (max-width:979px){ a.x-brand.img { background-image: url("http://cerulean.pmcgdev.com/wp-content/uploads/Cerulean-Mobile-Logo.png") !important; width: 67%; display: inline-block; background-size: contain; height: 50px; background-repeat: no-repeat; } .x-brand img { display: none; } }Regards!
August 4, 2016 at 11:41 am #1117487
Jacob DParticipantThanks for the updated CSS, but no luck – still showing the wide logo both in the X mobile preview and on my actual mobile device.
August 4, 2016 at 12:26 pm #1117577
Jacob DParticipantI just activated a child theme and saved the provided CSS in the child theme’s style.css and it worked! Not sure why it won’t work from the custom CSS field in the admin area, but I’ll call this one a win!
August 4, 2016 at 1:17 pm #1117647
JoaoModeratorGlad to hear it Jacob
Let us know if you need help with anything else.
Joao
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1114971 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
