Trouble with the visibility of the Bootstrap navigation bar menu icon

I am currently utilizing Bootstrap's navigation bar, and I have configured a menu icon. However, when I resize the browser window to a smaller size, the navigation bar functions properly but the icon does not appear.

HTML:

<nav id="navigation" class="navbar navbar-expand-lg">
      <a class="navbar-brand" href="index.html"></a>

      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>

      <div class="collapse navbar-collapse" id="navbarNav">
        <ul class="navbar-nav">
          <li class="nav-item active">
            <a class="nav-link" href="#about">About</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="#skills">Skills</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="#stats">Stats</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="#contact">Contact</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="#portfolio">Portfolio</a>
          </li>
        </ul>
      </div>

    </nav>

CSS:
.navbar-toggler-icon: {
    background: url(../img/icons/menu.png);
    background-size: 100%;
}

view image here

Answer №1

Ensure you verify the path of your image URL and enclose it in quotes such as

background: url("../img/icons/menu.png");

Another option to consider:

background-image: url("../img/icons/menu.png");

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

"Maximizing the functionality of HTML forms by incorporating PHP for efficient data retrieval

I have been exploring different approaches but I'm struggling to get this to function correctly. As a beginner, I am using form elements with dropdown menus to receive user input and then send the data via email. Here is the HTML and PHP code: <fo ...

Closing tags for an incomplete HTML snippet

Recently, I came into possession of a website with a news section that showcases a summary of each news article. Oddly enough, the original creators thought it would be sufficient to display only the first X characters of each article. This decision quickl ...

Step-by-step guide on sorting WordPress posts by a custom field date

I've created an event sidebar section that will only show the next 3 upcoming events. I have successfully set up the custom post type and custom fields, but I am struggling to figure out how to order the posts based on the start date of the events, wh ...

One web page featuring various query_posts

I'm in the process of developing a new template page for a WordPress theme that will feature 5 distinct "modules" embedded within the page's content section. These modules are designed to display the latest 4 posts from different categories, simi ...

Darken the backdrop of the bootstrap modal

When the modal is opened, the background turns black instead of having an opacity of 0.5 or something similar. How can I resolve this issue? I am using Bootstrap 3.2. Below is some CSS code snippet: .fade.in { opacity: 1; } .modal-open .modal { overflow ...

Show the outcomes by correlating the information provided by users with API data through the utilization

I am completely new to the world of jQuery, APIs, and HTML. I am currently working on an HTML page where users can enter a specific year and select a month from a drop-down menu. Upon clicking the "List Incidents" button, a table will be displayed based on ...

How can I set random background images on my Wordpress site?

I am currently using WP version 3.5.1 along with a twenty twelve child theme and PHP 5.2 on my server. I have been attempting to implement a php script (which has successfully worked on my other websites) to display random background images, however, it se ...

Despite my usage of className, I still encounter the error message "Error: Invalid DOM property `class`."

I am having trouble debugging this issue as I am unsure of the exact location of the error. Here is the link to the repository: https://github.com/kstaver/React-Portfolio Error #2. There are three more promise rejection errors present, which I will addres ...

Error: The JavaScript in Bootstrap requires jQuery version 1.9.1 or newer. Please make sure you are using the correct version

I've been attempting to access using Java code and the latest release of HTMLUnit (version 2.37.0, which I sourced from a jar download website along with all its dependencies). final WebClient webClient = new WebClient(); webClient.getOptions().setT ...

Appending a row to a table will not trigger events in Select2

Despite several attempts, I can't seem to get the select2:select event working on dynamically added rows in a table using select2. The event only works on the original row. Unfortunately, I don't have any additional details about this issue. COD ...

What is the best way to auto-fill input fields with data from a Json file

My goal is to automatically populate HTML form fields based on user selection. I have obtained code for related functions, such as fetching JSON data and creating dropdown lists, from a friend. Here is the link to that code: https://jsfiddle.net/r4zuy7tn/1 ...

Unable to interpret the JSON reply from the server

I am currently developing a web application that sends data to a website, which then updates its database and returns a JSON array to replace my web app page. I am using AJAX for this query, but I am facing an issue with preventing the overwriting of my we ...

Only one active class is allowed in the Bootstrap Accordion at any given time

I have implemented Bootstrap's accordion on my webpage, consisting of two different sections with unique content. Upon loading the page, the active class defaults to the first element of the first section. However, if I navigate to the "Second" sectio ...

How can you compare input text to the input value attribute using jQuery?

Consider this scenario: the page displays the following input element... <input class="textInput error" id="accountMailaddress" name="user[email]" size="30" type="text" value="<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail=" ...

The form-group nested within a form-horizontal is exceeding the boundaries of the preceding form-group

I am currently utilizing Bootstrap 3.3.6 and have a basic form enclosed in a panel: https://i.stack.imgur.com/UOFI6.png Although it is quite simple, the alignment of the "Post" button is not displaying properly. Here is the HTML code for the form: < ...

Develop an exclusive "click-once" button for a webpage

Can anyone assist me in creating a "one-time clickable" button to launch my website? I've searched through numerous threads on Stack Overflow but haven't found a solution yet. ...

Clicking while holding down the control key in Chrome causes the frame on my website to

My website consists of two frames - the main menu on the left and the content displayed on the right. However, I have noticed that when users use control+click in Chrome to open a new tab, the iframe page is displayed without the menu. Is there a way for ...

Struggling to align Jssor slider perfectly within a Bootstrap container

Struggling to center my slider images while using bootstrap with jssor. Despite trying to zero out the margins in the code below, the images within the slider remain aligned to the left side of the container. Any suggestions on how I can properly center ...

Exploring the document body with jquery

In my homescreen.jsp, I have a link that opens an iFrame when clicked. My goal is to hide the vertical scrollbar of homescreen.jsp when the iFrame is open. Using jQuery, I attempted to access the body of homescreen.jsp and was successful. However, I encou ...

A step-by-step guide to customizing the Material UI Chips delete SVG icon to appear in white color through

Using a Material UI component, I added a custom class to my chip. Attached is a screenshot showing what I mean. Currently, I am attempting to change the color of the cross button to white. After inspecting the element, I discovered that it is an SVG ico ...