Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1400106

    zettainino
    Participant

    OK. I tried your suggestion, but the logo is overlapping the hamburger menu.
    It’s not positioned at the top-center of the browser (on small devices).

    Any suggestions?

    #1400193

    zettainino
    Participant

    Or better yet, could you suggest how to replace the hamburger menu with my logo, only when browsing with smaller devices (<768px) ?

    #1400248

    Paul R
    Moderator

    Hi,

    You can add this under Custom > Edit Global CSS in the Customizer.

    
    @media (max-width: 767px){
    .sfm-navicon-button {
        content: url(http://ec2-54-218-24-252.us-west-2.compute.amazonaws.com/wp-content/uploads/2017/03/logo-icon-e1488768738609.png);
    }
    }
    

    Hope that helps.

    #1422683

    zettainino
    Participant
    This reply has been marked as private.
    #1423120

    Lely
    Moderator

    Hi There,

    The width of the fixed menu is 80px. Now, we can use this CSS to adjust the content:

    div#top {
        padding-left: 80px;
    }

    Hope this helps.

    #1423276

    zettainino
    Participant

    That worked well. Thanks.

    Another issue.
    The fixed menu actually has a logo at the middle, as mentioned in #1397462.
    But there are times, when the logo doesn’t show up.

    Could you suggest a better way (css?) to include the logo so it will always appear as expected.

    #1424549

    Rad
    Moderator

    Hi there,

    It’s because you added the javascript code like this

          if (document.documentElement.clientWidth > 768) {
    	jQuery(document).ready(function($) {
        $(\'<img src=\"http://oliohaus.com/staging/3127/wp-content/uploads/2017/03/logo-icon-50x50.png\" alt=\"\" style=\"top: calc(50% - 15px); position: absolute; left: 15px;\">\').insertAfter( \".sfm-navicon-button\");
    	});
    }  

    It should be like this

    jQuery(document).ready(function($) {
        $('<img src="http://ec2-54-218-24-252.us-west-2.compute.amazonaws.com/wp-content/uploads/2017/03/logo-icon-e1488768738609.png" alt="" style="top: 50%; position: absolute; left: 10px;">').insertAfter( ".sfm-navicon-button");
      
    });

    Thanks!

    #1427266

    zettainino
    Participant

    Ok. I have checked and changed the custom js.
    But after a while, the logo doesn’t show up.
    It’s inconsistent. sometimes it shows. sometimes not.
    *try loading different pages.

    #1427650

    Rad
    Moderator

    Hi there,

    Hmm, that could be due to loading speed. If that custom script is executed before SuperFly then it will not work. Let’s add some delay

    jQuery(document).ready(function($) {
    setTimeout( function() {
        $('<img src="http://ec2-54-218-24-252.us-west-2.compute.amazonaws.com/wp-content/uploads/2017/03/logo-icon-e1488768738609.png" alt="" style="top: 50%; position: absolute; left: 10px;">').insertAfter( ".sfm-navicon-button");
     } , 1000 );
    });

    Thanks!