Transparent Nav Bar over slider

Support Forums Cian – HTML Template Transparent Nav Bar over slider

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3872
    Bernard
    Participant

    Hi again. I was wondering if you could tell me a quick way to make the navbar transparent over the slider with white font, but maintain the full color and black font once you scroll to the body (like it does by default). The effect that I’m looking for is found in the navigation of the website here: http://www.feedstyle.com/

    Thanks,
    Bernard

    #3874
    CreaboxThemes
    Keymaster

    Hi Bernard,

    I have made tests and I have found a quick solution. You have to edit the file custom.js (folder js) and the file style.css (folder css).

    In the file custom.js you have to change the code from the line 198 to the end. You have to type the next code:

    jQuery(function() {
    	var bar = jQuery('nav');
    	var top = bar.css('top');
    	var ww = jQuery(window).width();
    	var navigationHeight = -jQuery('.collapse').height();
    	var mobileTop = Math.floor(navigationHeight - 60);
    	
    	jQuery(window).scroll(function() {
    		var homepageHeight = $('#homepage').height();
    		if(jQuery(this).scrollTop() < homepageHeight) {
    			bar.addClass('navbar-fixed-top');
    		} else {
    			bar.removeClass('navbar-fixed-top');
    			if(ww < 768) {
    					bar.stop().animate({top : mobileTop}, 600);
    			} else {
    				bar.stop().animate({top : top}, 300);
    			}
    		}  
    	});
    });

    And in the file style.css you have to edit the class nav.navbar-fixed-top (about the line 348) to this:

    nav.navbar-fixed-top{
    	background: transparent;
    	border-bottom: 0px !important;
    }

    And you have to add the next classes too:

    nav.navbar-fixed-top li a {
    	color:#FFF;
    	text-shadow: none;
    }
    
    nav.navbar-fixed-top .logo{
    	color: #FFF;
    }
    
    nav,
    nav.navbar-fixed-top,
    nav.navbar-fixed-top li a,
    nav.navbar-fixed-top .logo {
    	-webkit-transition: all 0.5s ease;
        -moz-transition: all 0.5s ease;
        -ms-transition: all 0.5s ease;
        -o-transition: all 0.5s ease;
        transition: all 0.5s ease;
    }

    Regards

    #3877
    Bernard
    Participant

    Thanks!

    #3881
    CreaboxThemes
    Keymaster

    You’re welcome 😉

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.