navbar

Align navbar toggle button to the right

孤人 提交于 2019-12-07 07:23:57
问题 I'm having a play around with Bootstrap 4, more specifically the navbar menu. Is there is a way I can make the little navbar toggle button align to the right of the page rather than have it floating to the left next to the logo? This is my current code. @media (min-width: 992px) { .navbar-nav li a { line-height: 85px; } } @media (max-width: 991px) { .navbar-brand { float: none; } } .navbar-toggler{ border:none; width:1em; } <nav class="navbar navbar-light bg-faded navbar-full"> <a class=

Hide menu items one-by-one on window resize

半城伤御伤魂 提交于 2019-12-07 04:06:58
问题 I'm working on a navbar consisting of a logo & menu-items floating left and a searchbar & a dropdown-button floating right. When the browser window reaches a certain small size the navbar elements will start to jump into the next row, because there isn't enough space anymore. Have a look here: http://codepen.io/anon/pen/YXBaEK Instead of starting a new row I'd like every menu item to disappear one-by-one if the horizontal space is running out. (I still have the menu links in a dropdown menu

Gap between Navbar and Jumbotron

会有一股神秘感。 提交于 2019-12-06 18:46:34
I am building I suppose you could call a template for the site I am going to build however I am still pretty new to bootstrap and thus have trouble figuring which CSS rules are affecting elements etc. The problem I am having is I cannot get the Jumbotron unit to sit flush with the bottom of the navbar. I have found a few questions on here about the same problem but the solutions did not work. Here is my code </head> <body> <div class="row"> <div> <img src="http://placehold.it/1600x300" width="100%"> </div> <!-- Static navbar --> <div class="navbar navbar-default navbar-static-top" role=

How do I make my HTML5 nav li tab stay active on click with CSS3?

ε祈祈猫儿з 提交于 2019-12-06 16:09:11
问题 I am learning HTML 5 and CSS3 and am having trouble with my tabbed navigation bar. I thought the li:active css stlye would achieve my goal but that only is upon click and doesn't stay that way. I have looked at many tutorials across the web and cannot find out how to do this with just CSS and HTML. I would like to avoid using javascript or php if possible. I have found information in a few places on "child" elements and using the z-index properties, and think this may be a possible solution,

How to implement RTL bootstrap 4 navbar?

妖精的绣舞 提交于 2019-12-06 13:25:44
I'd like to make my bootstrap navbar RTL. That is the logo in the right and the links flow from right to left. I have tried different tricks but none of they works. Here is the code I have right now: <nav class="navbar fixed-top navbar-expand-sm navbar-dark bg-dark float-right"> <!-- Brand --> <a class="navbar-brand" href="#">Logo</a> <!-- Links --> <div class="collapse navbar-collapse" id="nav-content"> <ul class="navbar-nav"> <li class="nav-item"> <a class="nav-link" href="#">Link 1</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link 2</a> </li> <li class="nav-item"> <a class=

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

雨燕双飞 提交于 2019-12-06 12:54:24
问题 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

Bootstrap 3 nav dropdown

亡梦爱人 提交于 2019-12-06 11:59:11
I'm using navbar with a dropdown menu (Bootstrap 3) I resize the browser window < 767px I open the menu I resize the browser window > 767px I open the dropdown menu (inside navbar) The issue: A scrollbar appears in the dropdown menu. (see picture below) My "nav" element is relative position. <nav class="navbar navbar-default clearfix" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class=

Pycharm上Django的使用 Day13

南楼画角 提交于 2019-12-06 11:25:20
设置应用程序的样式 为设置样式,我们将使用Bootstrap库 1.应用程序django-bootstrap3 1>安装django-bootstrap3 在活动的虚拟环境中执行命令:pip install django-bootstrap3 来进行安装 2>在settings.py的INSTALLED_APPS中添加如下代码,在项目中包含应用程序django-bootstrap3 3>让django-bootstrap3包含jQuery,这是一个JavaScript库,让你能够使用Bootstrap模板提供的一些交互式元素 2.使用Bootstrap来设置项目web_app的样式,并修改base.html 1>定义HTML头部 删除base.html的全部代码,并重新编写 1处加载了django-bootstrap3中的模板标签集 接下来,我们将这个文件声明为使用英语(3处)编写的HTML文件(2处) HTML文件分为两个主要部分:头部(head)和主体(body);在这个文件中,头部始于4处。HTML文件的头部不包含任何内容:它只是将正确显示页面所需的信息告诉浏览器 5处表示我们定义的一个标题栏 6处我们使用了django-bootstrap3的一个自定义模板标签,它让Django包含所有的Bootstrap样式文件,接下来的标签启用你可能在页面中使用的所有交互式行为

Horizontally centering a <ul> navbar that contains floated li elements in it

馋奶兔 提交于 2019-12-06 10:36:10
I've been trying to make a horizontal navbar with hover dropdown menus. I've got it working but in order for all of the elements in the to stay side by side (horizontal), they have to have float:left applied to them. Is there any way to get them to center? Also, is my CSS coding style...correct? I feel like I'm doing this wrong. Thanks! HTML: <div id="navbar" class="titlereg"> <ul> <li><a href="#">Reviews</a> <ul> <li><a href="#">DnB</a></li> </ul> </li> <li><a href="#">Opinions</a></li> <li><a href="#">About</a></li> </ul> </div> CSS: #navbar { width:500px; display:block; margin-left:auto;

Bootstrap navbar covers content on zoom

此生再无相见时 提交于 2019-12-06 08:50:55
I am building a website with a navbar-fixed-top class for the navbar.It works fine on everything except when I zoom in. When I zoom in on a mobile device; the navbar starts wrapping and goes to next line after collapsing. However, I do not want the navbar to be affected when zooming in but at the same time keeping the responsiveness for different devices. Is this possible or is there a work around ? <nav class="navbar navbar-default navbar-static-top lato-reg" id="navMenu"> <div class="container"> <div class="navbar-header page-scroll"> <button type="button" class="navbar-toggle" data-toggle=