Contents
JS
- $(window). scroll(function() {
- var height = $(‘.first-container’). var scrollTop = $(window). scrollTop();
- if (scrollTop >= height – 40) { $(‘.nav-container’). addClass(‘solid-nav’); } else {
- $(‘.nav-container’). removeClass(‘solid-nav’); }
How do I change the scroll color on my Navigation bar?
The nav bar currently changes background color when the content div starts moving off the screen. If we want the background to change as soon as the user scrolls, we can use the rootMargin property (top, right, bottom, left) and set the top margin to negative the height of the nav bar (60px in our case).
How do I make my Navigation bar opaque?
Go to attribute inspector of for Navigation bar and remove check mark from translucent. Please find in image. The Bar Tint color in the attribute inspector changes the background color of navigation controller.
2 Answers. Take the navbar and the logo out and place them above all sections. The logo and the navbar together are 256px high. So, apply margin-top: -256px; padding-top: 256px; to the first section and you’re done!
How do you make a navigation bar transparent in CSS?
The solution is easy. Just set the background-color CSS property to transparent . In css3 you can use transparent backgrounds instead of making the whole panel transparent. To add a transparent color you can do: rgba(255,255,255,.
How do I adjust my navigation bar?
bootstrap had 15px top padding and 15px bottom padding on . navbar-nav > li > a so you need to decrease it by overriding it in your css file and . navbar has min-height:50px; decrease it as much you want. add these classes to your css and then check.
JS
- $(document). ready(function () {
- $(window). scroll(function () {
- //Method 1: Using addClass and removeClass.
- //if ($(document).scrollTop() > 50) {
- // $(‘.navbar-default’).addClass(‘navbar-shrink’);
- //} else {
- // $(‘.navbar-default’).removeClass(‘navbar-shrink’);
- //}
How do I make a header transparent?
To create a transparent header, you will need to follow these steps:
- Create a new header in Header Editor;
- Add a row element;
- Select row Design Options and set a background color to none;
- Save your header;
- Open the page where you want to add the header;
How can I make navbar transparent when I scroll down?
When I am in the top of the page, the navbar is transparent, but when I scroll down it becomes opaque. Ok you need the following code to achieve this effect: (I am going to use jQuery as it is the bootstrap supported language).
If using Bloggers tabs navigation, apply it to .tabs-inner .widget ul in Template > Edit HTML > Above ]]> If using page list gadget on blogger you can apply it to .PageList or #PageList1 (could be #PageList2 or #PageList3 depending on your template and how many you’ve added). Go to Template > Edit HTML and paste above ]]>
How to add opacity to navigation bar template?
Go to Template > Edit HTML and paste above ]]> If using my tutorial on how to make your navigation sticky here, add the opacity to #navigationbar or sticknav depending on which part of the tutorial you used. Paste it above ]]> in Template > Edit HTML.
How to make the header image transparent in CSS?
For example if you want to make your header image slightly transparent on hover/mouse/roll over then you’d use the selector #Header1_headerimg:hover. Here is a recap of how to write CSS (from this post on understanding CSS in Blogger)