-
AuthorPosts
-
February 6, 2015 at 5:31 pm #200816
Hey there,
I’ve got a tricky question. I’ve got a site structured that is essentially the like Integrity Demo 4. Instead of using the site name text for the logo, I’ve uploaded a logo image. However, when using the image logo the header looks awful when the screen switches to a tablet/mobile layout. Is there any way to set things up to have the logo switch from image to text when the screen is a table/phone? Thanks in advance for your help!
AT
February 7, 2015 at 2:15 am #200984Hi there,
Thanks for writing in.
There is already a hidden text logo element is included with the Integrity 4 version.
We can help you to fix it with a CSS media query to switch between mobile/tablet and desktop versions.
Kindly share your URL.So we can provide you with the code to make it work.
Thanks!
February 9, 2015 at 5:31 am #202148This reply has been marked as private.February 9, 2015 at 10:25 am #202377Hi there,
Please add the following CSS under Customize -> Custom -> CSS :
@media (max-width:760px){ .x-navbar h1.visually-hidden { width: auto; position: static; height: auto; } .x-brand img{ display:none; } }
Hope it helps.
February 9, 2015 at 11:17 am #202414Thanks for the code – it worked great to change the logo from an image to text. However, now the text is too large (appears to be forcing h1) causing the the navbar to look wonky. Is there anyway to adjust the size/color of the text it switches to?
February 9, 2015 at 8:56 pm #202760Hi there,
Please update the code that was already on your Custom > CSS in the Customizer.
@media (max-width: 980px){ .x-navbar h1.visually-hidden { width: auto; position: static; height: auto; float: left; font-size: 3em; color: red; } .x-brand img{display:none;} } @media (max-width: 479px) { .x-navbar h1.visually-hidden {font-size: 2.5em;} }
Change the color red value to any color you want.
Hope it helps, Cheers!
February 10, 2015 at 10:33 am #203275Awesome that worked great! The only remaining issue I’m finding is that on all accessory pages (non-homepage) there is no text being displayed after the switch. Any thoughts on how to get that corrected to ensure the switch is happening on all pages? Thanks again – sorry for the multiple requests!
February 10, 2015 at 4:42 pm #203549Hi there,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / passwordDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks.
February 11, 2015 at 6:13 am #203936This reply has been marked as private.February 11, 2015 at 5:58 pm #204453Hi there,
This
<h1 class="visually-hidden"></h1>
is only available at site’s home page. And it’s there as SEO requirement since home pages doesn’t have head titles compared to normal pages. Please remove all css suggested above, instead, please follow this.Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Add this code at your child theme’s functions.php
add_action('x_before_view_global__brand', 'add_mobile_logo_text'); function add_mobile_logo_text ( ) { echo '<div class="mobile_logo_text">'.get_bloginfo( 'name' ).'</div>'.do_shortcode('[responsive_text selector=".mobile_logo_text" compression="1" min_size="14px" max_size="40px"]'); }
Then add this css at your customizer’s custom css.
.mobile_logo_text { display: none; } @media (max-width: 979px) { .x-brand img{ display:none; } .mobile_logo_text { display: block; } }
Hope this helps.
March 13, 2015 at 1:51 pm #226760This reply has been marked as private.March 13, 2015 at 9:43 pm #226970Hi There,
Try to update the CSS code above to this
.mobile_logo_text {display: none;} @media (max-width: 979px) { .x-brand img { display:none; } .mobile_logo_text { display: inline-block;font-size: 2.5em !important; } .x-btn-navbar, .x-btn-navbar.collapsed {margin-top: 3%;} }
Hope it helps, Cheers!
March 17, 2015 at 5:59 am #229055This reply has been marked as private.March 17, 2015 at 8:07 am #229134Hi There,
Upon checking your site you have cache plugin activated, Please deactivate and clear browser cache and it should solve the layout issue.
Hope it helps.
Thank you. -
AuthorPosts