Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #851763

    markspikerussell
    Participant

    Hi,

    I’ve created this div in the topbar to display some text under the navbar that is exposed as the top bar is hidden on scroll

    But I can’t get the z index to drop this div under the navbar.

    <div class=”banner”>The ultimate fitness and martial arts centre in Moray</div>

    With this css in the customizer

    .banner {margin: auto;
    width: 100%;
    padding: 10px;
    background: rgb(138, 20, 20);
    color: #f2eacb;
    position: fixed;
    top: 90px;
    z-index: -9 !important;
    text-align: center;
    }

    @media (max-width: 1000px){

    .banner {
    display: none;
    }
    }

    I suspect this is because its a child of the topbar and is a rule to the z index of the topbar.

    How can I change this, or can I place the div somewhere else that will work theme wide?

    Thanks,

    WP v4.4.2
    X child theme v1.0.0
    X v4.3.4

    http://109.169.59.51/~focusfit

    Thanks,

    Rob

    #851924

    Rue Nel
    Moderator

    Hello Rob,

    Thanks for writing in! Your site is under construction mode. Would you mind providing us the url of your site with login credentials so we can take a closer look? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    To do this, you can make a post with the following info:
    – Link to your site

    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thank you.

    #852237

    markspikerussell
    Participant

    Hi Guys,

    I’ll just disable the maintenance mode for you because I’ve got clef 2 factor security set up on the login.

    Site link is http://109.169.59.51/~focusfit

    Cheers!

    #852302

    Zeshan
    Member

    Hi Mark,

    Thanks for the URL!

    To show your div behind the navbar, add following CSS under Custom > CSS in the Customizer:

    .x-navbar {
      z-index: 1032;
    }
    

    Thank you!

    #852521

    markspikerussell
    Participant

    Thanks guys,

    That worked a treat!

    Cheers,

    I have another issue though, I’m using this JS to hide email addresses from spam bots;

    jQuery(document).ready(function($) {
    var $appendmail = $(‘.appendmail’);
    if ( $appendmail.length ) {
    var username = “info”;
    var hostname = “focusfitnesscentre.com”;
    var linktext = username + “@” + hostname;
    $(“” + linktext + ”
    “).appendTo( $appendmail );
    }
    });

    and inserting this <span class=”appendmail”></span> into the space where you would normally put a mailto, in my case its in the topbar and a text widget, but neither are displaying?

    Do you know why?

    Thanks

    #852849

    Friech
    Moderator

    Hi There,

    Please update your code to;

    jQuery(document).ready(function($) {
    var $appendmail = $('.appendmail');
    	if ( $appendmail.length ) {
    		var username = "info";
    		var hostname = "focusfitnesscentre.com";
    		var linktext = username + "@" + hostname;
    		$($appendmail).html(  linktext);
    	}
    });

    Hope it helps, Cheers!

    #852921

    markspikerussell
    Participant

    Perfect, thanks.

    I’ve got the old code on another site for a client, will that still work ok?

    What has changed to make the old code stop working?

    Cheers!

    #853104

    Rue Nel
    Moderator

    Hello There,

    The old code needs to be updated and also there was an issue with the quotes when you copied and pasted it to your new site.
    If you need anything else we can help you with, don’t hesitate to open another thread.

    Regards.