Issues with Bootstrap 5 navbar-light and font style rendering on Edge browser

My website seems to be having compatibility issues with Microsoft Edge. While everything works fine on Chrome, the navbar classes "navbar-light" and "bg-light" do not apply properly in Edge, and the font style defaults. I am using Bootstrap 5 and webfonts for the font. How can I troubleshoot this?

Below is the content of index.html page:

<!DOCTYPE html>
<html lang="en>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device=width, initial-scale=1, shrink-to-fit=no">
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="css/styles.css" rel="stylesheet">
    <!--<link href="assets/css/all.css" rel="stylesheet">-->
    <title>bootstrap</title>

</head>

<body>
    <nav class="navbar navbar-light bg-light navbar-expand-md">
        <div class="container">
            
           <!-- pro botao hamburg aparecer na esquerda, igual no rede market, eh so botar ele antes da logo-->
           <a class="navbar-brand" href="#"><img src="images/Rio-Turismo.png" width="90px"
                 alt="Rio Turismo"></a>
           
                 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#menu" 
                 aria-controls="menu" aria-expanded="false" aria-label="Botão de navegação">
            <span class="navbar-toggler-icon"></span>
         </button>

           <div class="collapse navbar-collapse" id="menu">
              <div class="navbar-nav me-auto">
                 <a class="nav-item nav-link" href="#passeios">Passeios</a>
                 <a class="nav-item nav-link" href="#excursoes">Excursões</a>
                 <a class="nav-item nav-link dropdown-toggle" href="#">Passeios Culturais</a>
                

                 <div class="dropdown-menu">
                     <a class="dropdown-item" href="#">Museus</a>
                     <a class="dropdown-item" href="#">Feiras</a>
                     <a class="dropdown-item" href="#">Bibliotecas</a>
                     <a class="dropdown-item" href="#">Livrarias</a>
                 </div>
  
                 <a class="nav-item nav-link" href="#">Reservas</a>
                 <a class="nav-item nav-link" href="#header">Contato</a>
              </div>

              <div class="d-none d-sm-block">telas small pra cima</div>
              <!--div q n eh mostrada em mobile-->

              <div class="navbar-nav">
                 <a class="nav-item nav-link" href="#pedidos">Meus Pedidos</a>
                 <a class="nav-item nav-link" href="#janelamodal">Entrar</a>
              </div>
           </div>
        </div>
     </nav>

    <img src="images/panoramica1.jpg">

    <script src="js/jquery-3.6.0.js"></script>
    <script src="js/bootstrap.bundle.js"></script>
    <script src="js/script.js"></script>
</body>


</html>

Answer №1

Have you double-checked the correctness of the js and css files imported on the page?

I ran a quick test using your code snippet, and I encountered the same behavior in both Chrome Version 95.0.4638.54 and Edge Version 95.0.1020.30. The three resource files in question are:

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

 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
 <script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="46242929323532342736067368776875">[email protected]</a>/dist/js/bootstrap.bundle.min.js"></script>

Here is the resulting output: https://i.sstatic.net/QqCTv.png

If possible, could you share more information so we can replicate this issue? Your cooperation will greatly assist in resolving the problem. Thank you for your support.

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

Tips for eliminating the border surrounding the entire table in Material-ui

Is there a way to edit a table in Material-ui without displaying it as a card? I'm looking to remove the border around the entire table, but I couldn't find any information on how to do that. Can someone help me out? Here is a link about the com ...

Is there a way to share the Username and Password without the need to manually input it?

My goal is to develop a C++ application for my classmates at school. Currently, they are required to visit our school's website and navigate to the login page. Once there, they enter their username and password, log in, and proceed to find their spec ...

Optimal method for creating a seamless loop of animated elements passing through the viewport

My challenge involves managing a dynamic set of elements arranged next to each other in a row. I envision them moving in an infinite loop across the screen, transitioning seamlessly from one side to the other, as illustrated here: https://i.stack.imgur.com ...

How to properly adjust image size in a flex-direction column layout - tips and solutions

My mission is to place an <img> with text blocks above and below it inside a container of specified height. The exact heights of the text blocks and image are unknown. After extensive searching, my colleague provided a useful solution by using the ...

Having trouble aligning the unordered list with the input

Can anyone help me troubleshoot my CSS so that the list appears below the input field? Check out this example The nested menu in this example is positioned too far to the left and slightly too high. It should be aligned with the bottom of the containing ...

What is the most effective method for incorporating CSS using Javascript to target a specific aria-label attribute?

Is there a way to add a CSS property to a specific tag with a particular aria-label on document load? My goal is to change the flex order of a section to 2. I need help using JavaScript to target the aria-label 'block 1' so I can set the order t ...

The Bootstrap navbar-fixed-top is failing to function properly within the confines of my "content" div

My goal is to utilize the bootstrap navbar-fixed-top within my id="content" div. However, when I apply the navbar-fixed-top class like this: <nav class="navbar navbar-default navbar-fixed-top navbar-shadow"> The navbar ends up on top of everything ...

Angular Flot Chart Resizing: A Guide to Dynamic Chart S

I have successfully integrated a Flot chart into my HTML using an Angular directive. Here is how it looks: <flot id="placeholder" dataset="dataset" options="options" height="300px" width="100%" style="width:100%;" ng-disabled="graphLoading" ng-class="{ ...

Postback does not reload all controls in the NameValueCollection

Recently, I designed a custom User Control in asp.net. public class InputMask : CompositeControl, IPostBackDataHandler, IPostBackEventHandler Imagine the custom control is enclosed within a div element: <div runat="server" id="inputArea"> < ...

Creating a function that uses setInterval to continuously update the input with a specific value

I am looking to use the setInterval function to continuously update the value of #test1. Additionally, I want the value of #test1 to be cleared and reset to 1 second after the user clicks a button. Example output can be found here: http://jsfiddle.net/eK ...

Shifting the "active" designation within a dropdown menu to correspond with the user's current page

Recently, I decided to explore the Foundation framework. However, my first stumbling block was figuring out how to use the "active" class in a dropdown menu. I am hoping to have the class applied to the page link that is currently being viewed by the user ...

The clickable areas for the href and onclick functions are extremely small and positioned inaccurately on the screen

The code below is supposed to load an image of a 'close window' button that should be clickable. However, when the page loads, the clickable area is only a couple of pixels wide and a pixel or two high, positioned just below or above the center o ...

Place the first paragraph within a div above another paragraph in the same div

Presently, I have this item: https://i.stack.imgur.com/0dBd9.png however, my objective is to achieve this look: https://i.stack.imgur.com/NEBZf.png The code snippet in question is as follows: .bonus-div { width: 290px; height: 29px; ma ...

Discover the secret to creating a seamless looping effect on text using CSS gradients, giving the illusion of an endless loop

Could use some assistance with looping this gradient smoothly over the text without any annoying jumps appearing during the animation. Is there a way to achieve a seamless movement across the text? Any suggestions on how to approach this? Here is a liv ...

I'm having trouble keeping my images aligned in a row, even when using the bootstrap row feature

After adding the <p> tags, my images are not staying on the same row as they should. Instead, they are each sitting on their own row. I'm not sure what I'm doing wrong here. <div class="container"> <div class=&qu ...

Conflict between Angular's ng-repeat directive and Sass styling

Currently, I am working on a project and encountering an issue that is causing some difficulty: In order to create a navigation bar with equally distributed list elements based on the number of items, I am utilizing ng-repeat for data binding and Sass for ...

How to ensure MUI DataGrid fills the vertical space without any overflow issues

Trying to implement a MUI DataGrid within a Flexbox layout that fills the remaining space precisely can be quite challenging. Imagine a setup like this: --------------------------- | Header | --------------------------- | Table Header ...

Using HTML5 data attributes as alternative configuration options in a jQuery plugin can present challenges

I am currently in the process of creating my very first jQuery plugin, and I have encountered a challenge when attempting to extend the plugin to support HTML5 data attributes. The idea is for a user to be able to initialize and adjust settings simply by u ...

How can one adhere to Angular's recommendation of "always using dots with ngModel" while working within isolate scopes?

Currently, I am working on developing an Angular application utilizing Bootstrap. To reduce the impact of Bootstrap on my HTML code, I have implemented two directives specifically for forms: form-control.js module.directive('formControl', func ...

The functionality of jQuery date picker and time picker is compromised when the fields are generated dynamically

I am currently utilizing the jQuery code below to dynamically create multiple input fields, which include time pickers and date pickers. However, I am encountering an issue where they are not functioning as expected. $('#add_another_event').clic ...