Struggling to display bootstrap glyph icons on any browser

I am currently following a tutorial on .Net Core from Pluralsight that heavily relies on Bootstrap glyph icons. However, I'm facing an issue where none of the glyph icons are showing up in any browser on my Windows 10 system (I've tried both the latest versions of Chrome and Edge). I have Bootstrap 5.2.0 downloaded from the official CDN. The default bootstrap references in the project created for me during the tutorial pointed to a local folder initially (see code snippets below), but since that didn't work, I decided to make changes as shown in my code snippets by referencing the CDN instead. From my _Layout.cshtml:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8fede0e0fbfcfbfdeeffcfbaa1bda1bf">[email protected]</a>/dist/css/bootstrap.min.css">

and:

<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="26444949525552544756661308140816">[email protected]</a>/dist/js/bootstrap.min.js"></script>

The code snippet from the tutorial that is supposed to render an input box and a glyph is as follows:

<form method="get">
<div class="form-group">
    <div class="input-group">
        <input type="search" class="form-control" value="" />
        <span class="input-group-btn">
            <button class="btn btn-default"></button>
            <i class="glyphicon glyphicon-search"></i>
        </span>
    </div>
</div>

Note: There should be a closing </FORM> tag in the above code, but it keeps getting cut off in StackOverflow's editor!

Unfortunately, what I see on my system is far from what is expected. I have marked in yellow where the glyph icon is meant to appear. There seems to be an invisible button present - when I hover over it, a rectangular outline appears, but there is no visible graphic:

https://i.sstatic.net/CQAZ2.jpg

Here are some troubleshooting steps I have already taken:

  1. Testing with different web browsers such as Chrome and Edge
  2. Verifying that all Windows updates are installed
  3. Starting with a simple "hello world" page from a w3 Schools Bootstrap tutorial and then adding my problem code (the form-group code mentioned above) - result is still the same, no glyph, just an empty placeholder button
  4. Trying various glyph icon names other than glyphicon-search - all yield the same outcome, no glyph icons displayed
  5. Confirming via Ctrl+U that Bootstrap is indeed being loaded by my page

I seem to be stuck at this point. Any assistance would be greatly appreciated.

Answer №1

It appears that you are utilizing [email protected], but the icons do not come as part of the original package. You will need to add an extra CSS file.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b1d3dedec5c2c5c3d0c19cd8d2dedfc2f1809f889f80">[email protected]</a>/font/bootstrap-icons.css">

To utilize different icon classes, you can find them here.

For example:

Instead of using:

glyphicon glyphicon-search

you should use:

bi bi-search

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="aecc13ab9faf998897abbda89fb">[email protected]</a>/dist/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4b2924243f383f392a3b0b7e6579657b">[email protected]</a>/dist/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3a58132375957548666371396">[email protected]</a>/font/bootstrap-icons.css">

<div class="form-group">
  <div class="input-group">
    <input type="search" class="form-control" value="" />
    <span class="input-group-btn">
      <button class="btn btn-default"></button>
      <!--<i class="glyphicon glyphicon-search"></i>-->
      <i class="bi bi-search"></i>
    </span>
  </div>
</div>

If you still wish to use Glyphicons, you must revert to a previous version of Bootstrap, as they are only free in that specific version.

https://getbootstrap.com/docs/3.3/components/

The previous bootstrap version includes over 250 glyphs from the Glyphicon Halflings set in font format. These are usually not available for free, but the creator has generously provided them for Bootstrap at no cost.

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

What is the technique for moving a slider-like checkbox slider to one of its labels when they are clicked on?

Is there a way to make the switch slider move to the word the user clicked on (medium or large)? I'm not sure if I can track the movement of the switch slider with JavaScript or if it's possible to do with CSS. Right now, I have only created a si ...

Identify the CSS Framework being used in conjunction with Selenium

I have developed a program that crawls through various web pages and conducts tests using Selenium. My current task is to identify which CSS Frameworks are utilized on these websites for statistical analysis. Currently, I am using the FireFox Webdriver to ...

Positioning the sDom in jQuery DataTables

Take a look at the image below: I want to adjust the position of the tableTools buttons (Copy, Excel, CSV) so that they appear aligned with the Search Box. I've experimented with different sDom parameters but haven't been successful. This is th ...

Changing the appearance of your website on various pages using WordPress: activating unique stylesheets

When connecting my stylesheets to my WordPress theme, I include the following in my customtheme/style.css file: @import url('bootstrap/bootstrap.min.css'); @import url('includes/styles1.css'); @import url('includes/styles2.css&ap ...

What is the best way to arrange flex elements in distinct columns for stacking?

Recently, I utilized the flex property along with flex-flow: column nowrap to showcase my elements. Take a quick look at what my elements currently resemble: [this] It's quite apparent that simply stacking both columns on top of each other won't ...

Interactive hover text appears when you mouse over the SVG path

Does anyone know the simplest way to display sample text when hovering over an svg path? Below is my CSS code: <style> path:hover{ fill:yellow;stroke:blue; } .available { fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;strok ...

Adjust the color of the label when the checkbox is marked, and make it red when the checkbox is left

Looking to create a customized checkbox due to challenges in styling the default HTML checkbox, I have attempted the following code. The checkbox functions properly when clicking on the label, but I am unable to change the border color of the label based o ...

I'm facing an issue with my 'root' div on ReactJS - it doesn't stretch all the way to the top. Any suggestions on how I can make it expand properly

While I realize this issue has been discussed extensively, none of the suggested solutions have worked for me. As a final attempt to resolve it, I am turning to you all here. The point at which my root div stops is puzzling: I've explicitly defined ...

Revamping Footer Text

Hey there, I'm feeling a bit inexperienced with this question, so after struggling on my own for a while I decided to turn to stackoverflow for help. So, I have a website located at , and at the very bottom of the page there's some copyright inf ...

Navigation arrows for sliding`

Is there a way to add custom right/left arrows to the Ionic slider component? Demo: Check it out on Stackblitz Note: Make sure to refer to the home.html page for more details. https://i.sstatic.net/jQ62l.png .html <ion-slides [pager]="true" [slide ...

Creating a CSS path that incorporates two conditions simultaneously

I'm currently facing a challenge with finding the CSS path in this scenario: There are over 20 child nodes, and I need to identify every node that has fill attribute not equal to none. I understand that I can target a specific node using :nth-child( ...

In the world of web design, blank areas can sometimes appear on a page as you

My website has a fixed header with a height of 44 pixels, content that takes up 89% of the screen, and a footer that occupies 6% of the space. Everything looks fine when the browser is at 100% zoom, but as I zoom out, white spaces start appearing before th ...

Issue arises when applying both overflow-x:scroll and justify-content:center

Encountering a problem with using overflow-x: scroll and justify-content: center on a flex parent container. Here is my code snippet: The issue: the first flex child item is not visible as it is cropped on the left side. Please refer to the screenshot and ...

Tips for dynamically including classes in NextJS component with class names from CMS?

I am in search of a solution that will offer some styling flexibility within a CMS to dynamically alter the classes of specific components within my NextJS application. The code snippet I'm working with is as follows: pages/index.js: ... import clien ...

Exploring the CSS scale transformation alongside the Javascript offsetHeight attribute

After combining offsetHeight with scale transformation, I experienced a strange result. Below is my simple HTML code: <body> <div id="id01"> Some Text </div> <div id="id02" style="transform-origin: left top; transf ...

What is the fastest way to emulate CSS3 box radius for IE in terms of rendering speed?

There are numerous options available in JavaScript, .htc, and jQuery to create rounded corners for IE 6,7,8. (Not compatible with IE 8) http://code.google.com/p/jquerycurvycorners/ http://code.google.com/p/curvycorners/ Which solution offers the faste ...

The panel's placement shifts when the browser window is expanded

Currently, the issue I am encountering involves an ASP.NET website with a header, sidebar, and additional right sidebar. When I resize the browser window, the left sidebar overlaps the content page, resulting in mixed-up controls. Please refer to the image ...

Impact on adjacent div

Within my code, I have two sibling divs that contain additional nested divs as shown below: <div class="btn_lists"> <div class="btn green_btn"> <img src="<?= asset_url() ?>images/escolar_07__1.png" /> </div> & ...

CSS: Eliminate unnecessary space at the top by implementing a margin and padding reset

I am puzzled by the presence of approximately 10px of whitespace at the top of my HTML file. Despite setting margin and padding to 0 in the "body" section of my CSS, the whitespace persists. Any suggestions? Thank you! Update: I discovered that removing t ...

What is the best way to incorporate a sliding div into these CSS Message Bubbles?

Just dipping my toes into web development, so please bear with me. I am working on a prototype of a Messaging Application and have most of the basics sorted out. Now, I am adding some finishing touches to enhance user experience. My goal is to make it so t ...