Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1128762
    SmartOrder
    Participant

    Hi Team,

    I was looking to place a border around a specific item on the menu. The site in question is http://www.adaptx.com.au/ and the menu item is ‘Get Started’.

    I need a border that has some padding around it so that it looks like a button. Ideally it will also change colour (from white to black) when the navbar changes colour on scroll.

    Cheers

    Martin

    #1128896
    Joao
    Moderator

    Hi Martin,

    Please add the following code to Appereance Customizer Custom CSS and adjust the settings acordding to your wishes.

    #menu-item-807 a {
        color: #fff;
        border-color: #ff7600;
        background-color: #ff7600;
        text-shadow: 0 0.075em 0.075em rgba(0,0,0,0.5);
        border-radius: 0.25em;
        padding-top: 12px;
        height: 35px;
        margin-top: 22px;
    }
    #menu-item-807 a span {
        box-shadow: none;
    }
    #menu-item-807 a:hover {
        color: #fff;
        border-color: #3f96ce;
        background-color: #3f96ce;
        text-shadow: 0 0.075em 0.075em rgba(0,0,0,0.5); 
      box-shadow: none;
    }

    Hope it helps

    Joao

    #1129526
    SmartOrder
    Participant

    Hi Joao,

    That gave me a few ideas and I was able to add the border on the initial transparent navbar. However, if you look at the site now the Get Started label shifts down on scroll. Can you suggest a fix to this? I would also like to change the colour of the border when the background changes to white.

    Cheers

    #1129707
    Friech
    Moderator

    Hi There,

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

    .x-navbar.x-navbar-fixed-top .x-nav>li#menu-item-807>a {
    	padding-top: 10px !important;
    	border-color: #3398db;
    }

    Hope it helps, Cheers!

    #1129711
    SmartOrder
    Participant

    In Joao absence, does anybody else have an idea?

    The changing in navbar appearance is handled by

    .x-navbar {
    background-color: transparent;
    border-bottom: none;
    box-shadow: none;
    }

    .x-navbar.x-navbar-fixed-top {
    background-color: white;
    height: 70px;
    }

    .x-navbar.x-navbar-fixed-top .x-nav > li > a {
    padding-top: 30px !important;
    }

    and

    jQuery(function($){

    $(window).scroll(function(){

    if( $(this).scrollTop() == 0 ) {
    $(‘.x-navbar-fixed-top’).removeClass(‘x-navbar-fixed-top’);
    }

    })

    });

    #1129714
    SmartOrder
    Participant

    just saw the above response. Worked like a charm. Thank you guys!!

    #1129765
    Christopher
    Moderator

    You’re welcome.

  • <script> jQuery(function($){ $("#no-reply-1128762 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>