The collapse feature of the navbar-toggle is not showing up

My navbar is experiencing issues with the navbar-toggle collapse class. When I reduce the size of the page, the button meant to appear does not show up, even though other collapsing elements are working properly.

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header" style="padding: 10px;">
  <button type="button" class="navbar-toggle collapse" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
    <span class="sr-only">Toggle navigation</span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
  </button>
    <a class="navbar-brand" href="#" style="font-size: 40px">LIVIE</a>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
  <ul class="nav navbar-nav">
      <li class="dropdown" style="padding: 10px;">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" style="font-size: 40px">V <span class="caret"></span></a>
      <ul class="dropdown-menu" role="menu">
        <li><a href="#">Action</a></li>
        <li><a href="#">Another action</a></li>
        <li><a href="#">Something else here</a></li>
        <li class="divider"></li>
        <li><a href="#">Separated link</a></li>
        <li class="divider"></li>
        <li><a href="#">One more separated link</a></li>
      </ul>
    </li>
  </ul>
    <form class="navbar-form navbar-left" role="search" style="padding: 10px;">
    <div class="form-group">
        <input type="text" class="form-control" placeholder="Search" style="width: 400px">
    </div>
    <button type="submit" class="btn btn-default">Submit</button>
  </form>
    <ul class="nav navbar-nav navbar-right" style="
    padding: 10px;">
    <li><div class="stars">
  <form action="">
<input class="star star-5" id="star-5" type="radio" name="star"/>
<label class="star star-5" for="star-5"></label>
<input class="star star-4" id="star-4" type="radio" name="star"/>
<label class="star star-4" for="star-4"></label>
<input class="star star-3" id="star-3" type="radio" name="star"/>
<label class="star star-3" for="star-3"></label>
<input class="star star-2" id="star-2" type="radio" name="star"/>
<label class="star star-2" for="star-2"></label>
<input class="star star-1" id="star-1" type="radio" name="star"/>
<label class="star star-1" for="star-1"></label>
<br/>
<h4 style="padding-left:40%;padding-top: 30px;color: white">NAME</h4>
</form>
</div></li>
<li> <a class=" glyphicon glyphicon-envelope" href="#" style=";font-size: 
36px;color: white;margin-left: 20px;" id="notify" ></a></li>
<li><a class=" glyphicon glyphicon-user" href="#" style=";font-size: 
36px;color: white;margin-left: 20px;" id="open"></a></li>
 </ul>
 </div><!-- /.navbar-collapse -->

In addition, the elements on the right side of the page move down when the page size is reduced. Any assistance would be greatly appreciated.

Answer №1

Get rid of the collapse class from the toggle button..

<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
    <span class="sr-only">Toggle navigation</span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
</button>

http://www.bootply.com/0PL7Fg7Yw8

You should also tidy up the HTML. It needs 2 closing tags added.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

"Encountered a hiccup while trying to retrieve Selector with

I have a list of 335 different gene access numbers, each corresponding to a unique URL. These URLs are used to make requests from the NCBI website GenBank. The specific data I am looking for can be found in an XPath called: //*[@id="viewercontent1"]/pre ...

Prevent function from running when scrolling due to jQuery click or blur event conflict

I have successfully implemented smooth scrolling on my website, but I am facing an issue with a booking script. One of the fields in the script is a select time input, which opens a popup showing the available hours of the day when clicked. You can view a ...

Presentation Slider (HTML, CSS, JavaScript)

Embarking on my journey of creating webpages, I am eager to replicate the Windows 10 start UI and its browser animations. However, my lack of JavaScript knowledge presents a challenge. Any help in reviewing my code for potential issues would be greatly app ...

Can a JavaScript function spontaneously run without being called upon?

<a onclick="determineCountry(data)" class="installbtn">Install</a> My goal is to have the user redirected to one of three sites based on their location when they click the button above. However, there seems to be an issue with the script below ...

Building personalized error messages using graphql-js and express

It has come to my attention that you have the ability to create customized errors within graphql and graphql-express. https://codeburst.io/custom-errors-and-error-reporting-in-graphql-bbd398272aeb I recently implemented a custom Error feature, but it see ...

The use of history.pushState in Chrome triggers a request for the favicon

Code : var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname +"?"+ queryStr; window.history.pushState({path:newurl},'',newurl) Current issue : There is a problem where each time wind ...

Overriding model methods in SailsJS

As I integrate caching (redis) into my project, my preference is to incorporate it into the model logic rather than the controller. This would involve overwriting the model method and including the caching logic within that. I am aware that certain method ...

Tips on utilizing AngularJS $http for transferring multipart/form-data

In the process of creating a visual interface that interfaces with various REST services (coded in Java), I am encountering an issue when attempting to call one such service: @PUT @Path("serviceName") public Response serviceName(final FormDataMultiPart mu ...

Steps to ensure that the alert box size perfectly aligns with the width of the modal

Is there a way to resize the warning alert box so that it fits perfectly within the modal? https://i.sstatic.net/Mod1K.png Here is the code snippet: <div id="deleteCurso" class="modal fade" role="dialog"> ...

Ways to modify, delete, or insert data elements within a collection of values using React

I'm currently working on implementing a dropdown menu for departments within a location edit form. I'm wondering if there's a way to update or create new elements in the list of values. The API I'm using only sends specific data elemen ...

Can you explain the purpose of the window.constructor and global.constructor functions in JavaScript?

Can someone explain the purpose of this function? I've been searching for information but can't find anything. I tested it in Firefox: window.constructor() // TypeError: Illegal constructor new window.constructor() // TypeError: Illegal constru ...

Leveraging the power of Ajax in Zen to dynamically populate the database in the

Currently utilizing ZendFramework, I am looking to display database-stored data in a table on the view. However, I want to accomplish this using Ajax and json instead. I have a web service that outputs the following: {"cat":[{"id":"1","name":"Meat","image ...

Obtain a string value from a JavaScript object

My dilemma involves a specific Javascript object. { A: 1, B: 2, C: 2, D: 1, E: 1, F: 4, G: 6, H: 2 }, The goal is to extract a four-letter string based on the key with the highest value, but there are limitations. The stri ...

Avoiding Memory Leaks and Managing JS Heap Size While Polling Large Amounts of Data Every 5 Seconds with Vuex

I'm currently working on a Vue application that utilizes Vuex for state management. Within this application, I have several store modules set up at the root level. Periodically, every 5 seconds, I retrieve a large amount of data and update the store s ...

Enhancing Performance by Optimizing Module Loading for Frontend Component Rendering in Next.js

When building a Nextjs app, it is common to use the same package across multiple components on a page. However, in the case of client-side rendering, the default behavior does not optimize the loading of the common package. This can result in a significant ...

Issue with Context Menu Not Triggering on Dynamically Added Elements in JQuery

Check out the JSFiddle Demo Within my email sidebar, I implemented a custom right-click feature that allows users to add new sub-folders. The code snippet below demonstrates how this functionality works: if ($(this).hasClass('NewSubFolder')) { ...

Trigger the Modal once the navigation step is completed

When navigating to a new page, I need to wait for the navigation process to complete in order for the modal template to be properly displayed on the destination page. public onOpenModal(item) { this.router.navigate([item.link]).then(() => { this. ...

Is there an alternative solution to resolving this issue with OTP verification?

Working on a verification system where users are redirected to verify their account with an OTP code after signing up. However, I encountered an issue where the code doesn't seem to work as expected and no error messages are being displayed. <?php ...

Is the "sizes" attribute of the "picture" element functional in Chrome when it comes to <source>?

The incredible <picture> element has been functioning flawlessly in the Chrome browser for well over a year, yet regrettably, I seem to be encountering an obstacle when attempting to make use of the powerful sizes attribute within the <source> ...

What is the best approach to designing a dynamic class toggler for a React sidebar?

I am trying to add a specific class to a clicked link within a sidebar. While this works for one link, when I attach the handler to another link and click it, both links get assigned with the new class. Is there a way to make this functionality more like ...