navbar

Bootstrap jQuery Tabs are not working in Dropdown

偶尔善良 提交于 2019-12-23 04:42:57
问题 $('.dropdown-menu li').on('click', function(event){ //The event won't be propagated to the document NODE and // therefore events delegated to document won't be fired event.stopPropagation(); }); $('.dropdown-menu li').on('click', function(event){ //The event won't be propagated to the document NODE and // therefore events delegated to document won't be fired event.stopPropagation(); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> <script src="https

CSS Bootstrap navbar- center search bar that takes the whole width on collapse

☆樱花仙子☆ 提交于 2019-12-23 04:27:00
问题 I have a bootstrap v.3 navbar with 3 elements in it. I would like to align elements evenly so that the search bar is centred in the navbar. And when it collapses that it takes the full widht. But struggling to do that. This is the html for it: <nav class="navbar navbar-transparent navbar-fixed-top" role="navigation"> <div class="container"> <!-- Brand and toggle get grouped for better mobile display --> <div class="col-lg-4 navbar-header"> <button type="button" class="navbar-toggle" data

Refresh user name in navbar after username has changed (Using Asp.Net, MVC and C#)

若如初见. 提交于 2019-12-23 03:11:43
问题 I am trying to update the user name in the navbar (using ASP.NET, MVC, C#) after a user has changed his or here user name when signed in. So the user name is shown, but when it's changed the old user name is still being displayed in the navbar until the user loges out and in again. Dose any one know how to display the new user name in the navbar in a nice way? This is a short version of how the navbar looks like: <nav class="navbar navbar-default navbar-fixed-top"> @if (Request

Shrinking Bootstrap Navbar with logo on scroll

痴心易碎 提交于 2019-12-23 03:07:02
问题 I need the fixed navbar to shrink 50% when it starts scrolling. I have seen just text navbars, but nothing with a logo. Any help would be much appreciated. http://carpetliquidators.com/demo/ You can pull the css and html from there. 回答1: This can be accomplished by using jQuery and a custom CSS class, like so: $(window).scroll(function() { if ($(document).scrollTop() > 150) { $('.navbar').addClass('shrink'); } else { $('.navbar').removeClass('shrink'); } }); 来源: https://stackoverflow.com

Bootstrap 4 - Navbar Header usage

我的未来我决定 提交于 2019-12-23 02:28:41
问题 I'm kind of new at bootstrap, I was taught alpha-4 btw, and while making the navbar on my site i found out a problem when it collapses and shows the 3-row-lines-icon of the menu, it overlapped the logo with .navbar-brand . I resolved this just by adding pull-right to it. Looks like this now, it actually works... <nav class="navbar navbar-dark bg-inverse navbar-fixed-top" id="navbar"> <button class="navbar-toggler hidden-lg-up pull-right" type="button" data-toggle="collapse" data-target="

Space between menu and drop down menu

落花浮王杯 提交于 2019-12-22 18:13:25
问题 I'd like for the drop down menu to show below the border line in the main menu area instead of showing up right underneath the 'menu' title/button. I can change the positioning so that it is lower but then there is dead space in between that makes it impossible to mouse over the drop down menu. I don't want to add padding above the drop down because that just created more purple space, where I want that space to be empty. Below is the code but feel free to view here: link html: <div class=

Materialize - Full screen slider and navigation bar

不打扰是莪最后的温柔 提交于 2019-12-22 14:57:08
问题 During a project's development I've decided to use a full screen image slider. As shown on the official site : Link In this way the navigation bar is disappeared, but on a Youtube video I've seen that there is a way (which I don't know) in order to maintain both the full-screen slider and the navbar. Can anyone help me in this problem? Is there a way to take both of these features? Thanks. Here is the code: <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs

How can you create a vertical navbar with drop down menus?

旧城冷巷雨未停 提交于 2019-12-22 05:23:21
问题 I have a vertical navbar. Now, this navbar is supposed to have drop down menus. The only problem for me is, I am unable to make it so that the drop down menus are to the side of the menu. I have the HTML and CSS code on jsFiddle here: http://jsfiddle.net/maxkoenig/ZYUeX/ Here it is if you don't want to go on the website: HTML: <div id="wrap"> <ul class="navbar"> <li><a href="/index.php">Home</a></li> <li><a href="/boattypes/featureboats.php">Boat Types</a> <ul> <li><a href="/boattypes/sprint

Django: how to get the name of the template being rendered

人走茶凉 提交于 2019-12-21 12:35:40
问题 I'm implementing a bootstrap navbar as show in this example here Items in a navbar are <li>'s , the "selected" item has the attribute class="active" : <li class="active"> <a href="#"> Link1 </a> </li> <li> <a href="#"> Link2 </a> </li> In Django these items will be within a template, which gets included by any templates that are supposed to display the navbar. I'm thinking about doing it this way: <li> <a href="/" class="{% if template_name == "home.djhtml" %}active{% endif %}"> Home </a> <

Navbar dropdown not working on mobile devices

我怕爱的太早我们不能终老 提交于 2019-12-21 12:03:05
问题 I've run into an issue with the navbar in Bootstrap 3. One of my menu items is a dropdown, which works fine on my laptop, but doesn't work on my android phone. Specifically nothing happens when pressing on the dropdown menu item on my phone. I've searched google, this site, and several others for a solution, but have yet to find one. There seems to be a few solutions/workarounds for Bootstrap 2, but none of them seem to work for me. I know there are some differences between version 2 and 3,