Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #266017

    Hi
    How can I swap logo image when the browser width is lower than 768px?

    Can I do this via @media query?

    Thanks

    #266025

    Hi!

    Yes, you can modify the logo structure in includes/helper-main-menu.php (line 101), and with some CSS:

    @media only screen and (min-width: 768px) {
    #mobile-logo{
    display: none;
    }
    }
    
    @media only screen and (max-width: 767px) {
    #desktop-logo{
    display: none;
    }
    #mobile-logo{
    display: block;
    }
    }

    Regards,
    Josue

    #266080

    Thanks, but I mean to add own logo to mobile version.

    #266201

    Open /includes/helper-main-menu.php, go to line 101 and modify it to something like:

    echo "<div id='desktop-logo'>".avia_logo(AVIA_BASE_URL.'images/layout/desktop-logo.png', $addition, 'strong', true)."</div>";
    echo "<div id='mobile-logo'>".avia_logo(AVIA_BASE_URL.'images/layout/mobile-logo.png', $addition, 'strong', true)."</div>";
    

    You’d need to upload the respective logos to the folder set there, don’t forget to add the CSS i provided in my last reply.

    Cheers!
    Josue

    #266207

    Hey J!
    You made my day.
    Cheers!
    Thank you.

    #266210

    You are welcome, glad we could help :)

    Regards,
    
Josue

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Swap logo if browser width’ is closed to new replies.