navbar

Top navbar (under header) fixed on top of screen when scrolling

这一生的挚爱 提交于 2019-12-04 20:44:11
When scrollbar is on top browser displays: HTML: ------------------------- | HEADER | ------------------------- | NAVBAR | ------------------------- | body | ------------------------- When scrollbar is down NOW browser normally displays: HTML: ------------------------- | | | body | | | ------------------------- But I'd like to have: ------------------------- | NAVBAR | ------------------------- | | | body | | | ------------------------- I tried with: <div id="navbar">...</div> CSS: #navbar { position:fixed; z-index:1; } But this only works if navbar is on the top position. I have the header on

Using server-side includes, what are options for selecting a current nav element?

Deadly 提交于 2019-12-04 18:26:25
I'm using a 10-item unordered list as a navigation bar. Using SSI, I put the header and navigation bar into every file. I'd like a way to add class="active" to the ruleset of the currently active page (the current page's corresponding <li> will have a different style). Including the file in every page means that, in the included file, none of the items can have the active class. Is there a way to do this in just a few lines of code? (using jQuery/JS) My other option is to match the last part of the URL to part of the href of the anchor within each list item. Solution: (courtesy of

How to change UINavigation Back Button to an image?

安稳与你 提交于 2019-12-04 18:03:12
So I have these images that are used for a custom Nav bar and items, they look like this.Currently I have the custom nav bar set up, however I don't know how change the default "back" button to the back button image below, this is what I want to know? Any help would be greatly appreciated. Note: I am using storyboards. Thanks This is the nav bar: This is my back button that i don't know how to imlpement. mr.boyfox If you want add back button to UINavigation try this: First create back button: 1. If you don`t need back action: UIBarButtonItem *myBackButton = [[UIBarButtonItem alloc]

Bootstrap navbar align want align to the right

早过忘川 提交于 2019-12-04 16:08:46
问题 I'm trying to align the navbar to the right. When I use the .pull-right class it's pushing the navbar too much to the right: "off the grid". What am I doing wrong? Code: <div class="row"> <div class="span3 top_logo"><img src="images/logo_svart.png" width="177" height="60" alt="BETA Team Performance" /></div> <div class="span9"> <div class="navbar navbar-static-top"> <div class="navbar-inner"> <div class="container"> <button type="button" class="btn btn-navbar" data-toggle="collapse" data

Centered icons above / over / on top of text in Navbar? (Bootstrap 3)

大城市里の小女人 提交于 2019-12-04 15:59:24
问题 I spent some time searching for a way to do this & tried a couple (close) examples without success. Example here I'm basically trying to put the little android icons centered above the "Sub#" text in the subnav. Any help would be appreciated. The area of the code is: <span class=""> <span>Sub1</span> <i class="fa fa-android fa-lg"></i> </span> 回答1: You should wrap each of icons in col-xs-2 with a col-xs-offset-1 in the first div to make it centered. You can use <br> tags to create a line

Hide Twitter Bootstrap navbar on click

孤者浪人 提交于 2019-12-04 14:51:35
I wanted to close the mobile navbar on click, I see the answer for my question here . The problem with the code given in this question is that it's always trying to close the navbar, no matter if we see the toggle navbar or the "Normal" navbar. So I want to do an if/else that check if the width is higher or lower that 768px (the width that changes the navbars), so I have this in my document.ready() right now. function close_toggle() { if ($(window).width() <= 768) { $('.nav a').on('click', function(){ $(".navbar-toggle").click(); }); } } close_toggle(); $(window).resize(close_toggle); The

Fading bootstrap navbar on scrolldown, while changing text color

回眸只為那壹抹淺笑 提交于 2019-12-04 14:38:25
问题 so I'm working on a Ruby on Rails app with a design given to me which calls for the navigation bar to be transparent at the top of the page, and then fade into solid white after scrolling down past a certian <section> on the page, at the same time, the navbar link text is white at the top, and will fade to grey at the same <section> . I've looked into JavaScript that changes opacity on scrolldown, but I haven't had success getting it to work. I'd imagine that the same function(s) to fade in

Changing Bootstrap's navbar opacity without affecting the buttons

限于喜欢 提交于 2019-12-04 13:48:38
问题 I only want my navbar buttons to be visible, while the actual bar that spans across the entire page has full opacity. Whenever I change the opacity of the navbar it affects the classes inside of it, even when I specify those classes to have no opacity. I've posted an image of what I'm trying to replicate. As you can see, the links appear in full, but the navbar is invisible, allowing the complete background image to show. It might look like a solid red bar, but I assure you it's an invisible

what do css classes like my-2, my-lg-0, mr-sm-2 do in bootstrap 4?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 12:44:44
I have looked at other questions and the bootstrap documentation and cant seem to find out what these classes do to elements. Any help is appreciated! Im just trying to make my search bar be 1/4th the size on a large viewport, 1/3 the size on a medium viewport, and 100% the size on a small viewport! Those are bootstrap spacing utilities classes : mr-sm-2 : r - for classes that set margin-right or padding-right my-2 , my-lg-0 : y - for classes that set both *-top and *-bottom the m m - for classes that set margin you can see the notation from boostrap spacing here sm and lg are utilities

AngularJs, change menu item whether user is connected or not

心已入冬 提交于 2019-12-04 11:57:24
I am new to AngularJS and I try to deal with user authentication. I ensure non connected user can't access restricted route : app.js .config(function ($routeProvider) { $routeProvider .when('/myroute', { templateUrl: 'views/myroute.html', controller: 'MyrouteCtrl', access: { isFreeAccess: false } }) ... .run( function ($rootScope, $location, Auth) { $rootScope.$on('$routeChangeStart', function(currRoute, prevRoute){ if (prevRoute.access != undefined) { // if route requires auth and user is not logged in if (!prevRoute.access.isFreeAccess && !Auth.isLogged) { // redirects to index $location