Unable to override the Bootstrap theme

Despite trying multiple methods, I've found it challenging to override the CSS of Bootstrap specifically for this paragraph element P.fs-5.text-muted. Interestingly, all other CSS elements are easily modifiable.

Here's an example that works:

H1.display-4.fw-normal {
  font-size: 25px;
}

However, I'm puzzled as to why this snippet doesn't work:

P.fs-5.text-muted {
  color: #00f;
  font-size: 10px;
}

I attempted adding a custom.css file and linking it to the main HTML file after the bootstrap link but unfortunately saw no changes.

Below is the complete code of the page:

<html lang="en">
   <head>
      <meta charset="utf-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1" />
      <meta name="description" content="" />
      <meta
         name="author"
         content="Mark Otto, Jacob Thornton, and Bootstrap contributors"
         />
      <meta name="generator" content="Hugo 0.88.1" />
      <title>Pricing example · Bootstrap v5.1</title>
      <link
         href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="bad8d5d5cec9cec8dbcafa8f948b")))U}`}de'>[email protected]</a>/dist/css/bootstrap.min.css"
         rel="stylesheet"
         />
      <script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="25474a4a51565157445565100b140b16">[email protected]</a>/dist/js/bootstrap.bundle.min.js"></script>
      <!-- Custom styles for this template -->
      <script src="new.js"></script>
      <style id="style">
         P.fs-5.text-muted {
         color: #00f;
         font-size: 10px;
         }
         H1.display-4.fw-normal {
         font-size: 25px;
         }
      </style>
   </head>
   <body
      data-new-gr-c-s-check-loaded="14.1044.0"
      data-gr-ext-installed=""
      style="overflow-x: hidden"
      >
      <div class="container py-3">
      <header>
         <div
            class="d-flex flex-column flex-md-row align-items-center pb-3 mb-4 border-bottom"
            >
            <a
               href="/"
               class="d-flex align-items-center text-dark text-decoration-none"
               >
            <span class="fs-4">Pricing example</span>
            </a>
            <nav class="d-inline-flex mt-2 mt-md-0 ms-md-auto">
               <a class="me-3 py-2 text-dark text-decoration-none" href="#"
                  >Features</a
                  >
               <a class="me-3 py-2 text-dark text-decoration-none" href="#"
                  >Enterprise</a
                  >
               <a class="me-3 py-2 text-dark text-decoration-none" href="#"
                  >Support</a
                  >
               <a class="py-2 text-dark text-decoration-none" href="#">Pricing</a>
            </nav>
         </div>
         <div class="pricing-header p-3 pb-md-4 mx-auto text-center">
            <h1 class="display-4 fw-normal">Pricing</h1>
            <p class="fs-5 text-muted">
               Quickly build an effective pricing table for your potential
               customers with this Bootstrap example. It’s built with default
               Bootstrap components and utilities with little customization.
            </p>
         </div>
      </header>
   </body>
</html>

Why does the paragraph stubbornly refuse to update? Is there a workaround that doesn't involve using Sass?

Answer №1

Utilize !important.

Take this scenario:

.special-class{
    color: red!important;
}

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

How can you use JavaScript to retrieve the position of an element on a webpage?

As mentioned in the title, I am looking for a way to retrieve the x and y positions of an element relative to its location on the webpage and based on its positioning schemes such as absolute or relative. ...

Utilizing Jquery tabs for consistent height display

Currently, I am utilizing jquery tabs for showcasing various content. This is what my functions look like: $(function() { $( "#tabs" ).tabs(); }); I attempted to ensure all tabs have the same height by using this approach: var heightStyle = ...

Utilizing a lone div for clearing a float

For a long time, my go-to method for clearing floats has been using <div style="clear:both;"></div>. However, I recently began wondering if in HTML as XML, could I simply use <div style="clear:both;" /> since they essentially serve the sa ...

`Passing JavaScript variables through HTML anchor tags`

I am currently attempting to pass the id to the controller using this method: {{ route("admin.service.edit", '+val[0]+' )}} However, the '+val[0]+' is being interpreted as a string in the URL http://localhost:8000/admin/servi ...

Mobile version experiencing issue with Navbar not collapsing

The dropdown navigation bar on the mobile version of my website is not functioning properly. Despite several attempts, I have been unable to figure out a way to make it work effectively. <!DOCTYPE html> <html lang="en"> <head> & ...

Center-align the items in an owl carousel

My website uses owl carousel to display images fetched through PHP. The challenge is that the number of items is unpredictable, and sometimes there are fewer images than the default 10. As a result, the images align to the left instead of being centered. H ...

Acquiring Twitter updates for a dynamic Bootstrap carousel display

I've been trying to load multiple tweets from the stream into the slideshow, but I can only get one to show up. I believe it has to do with the placement of the <div id="feed"> element, but I can't seem to figure out what I'm missing. ...

Mastering the art of utilizing Angular Routing alongside CSS grid for seamless website navigation

My <app-root> layout is pretty straightforward: app.component.ts import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.compone ...

The alignment of the text with the Bootstrap glyphicon is off

Currently, I am in the process of developing a form and implementing validation on my bootstrap form using bootstrap components. To handle server side validation, I am utilizing a c# class library, and then using c# code-behind to apply styles when the for ...

Setting up Stylelint in a Next.js project: A step-by-step guide

I'm looking to incorporate Stylelint into my Next.js app. Can I modify the next.config.js file to include the stylelint-webpack-plugin, in order to receive style errors during compilation? // next.config.js module.exports = { reactStrictMode: true, ...

How to divide a string by space after a specific character count using Javascript

I've been working on a tool that can divide input text into chunks based on a specific character count without breaking words in the process. Currently, I have set it to split the text after 155 characters. Even after conducting extensive research, ...

Dynamically resizing a property in the DOM with Angular

Could someone help me with an issue I'm having regarding resizing items on the screen in Angular when the browser window size changes? Here is my code snippet: // TS File height: number = 2.5; objHeight:number; screenHeight:number = window.innerHeig ...

What is the best way to make the sidebar occupy the entire space?

Learn about creating sticky footers using this method and check out an example here. * { margin:0; } html, body { height:100%; } #wrap { min-height:100%; height:auto !important; height:100%; margin:0 0 -47px; } #side { float:left; backgro ...

Vue: auto-suggest feature in a text input field

I am looking to implement a text field with typeahead functionality. Essentially, I have a collection of words and as you start typing in the field, suggestions should appear based on the input. The challenge is that it should be capable of providing sugge ...

Unable to retrieve the iframe variable from the parent as it returns undefined

I am trying to retrieve a variable within an iframe from the parent index.html. Here is the index.html code: <!doctype html> <html lang="en-us> <head> <title>Test</title> </head> <body> <p>Test& ...

Why isn't my heading showing up as expected in my document?

Can anyone help me understand why my title appears so low on certain screens? I've previously tried removing the negative margin when the title was hidden, but now it's positioned too far down. Here is the link to my webpage: ...

Retrieve the href value from a DOM element

I'm currently working on a piece of code that aims to extract only the hrefs from the nav section. Here's what I have so far: componentDidMount(){ $("nav ul li a").each(function(k, j){ console.log(j); }); } So far, I've bee ...

Django: Limit available selections based on preceding model choices made

I am managing multiple models: class Game(models.Model): name = models.CharField('Nom du jeu', max_length=100) logo = models.ImageField('Logo', blank=True, upload_to='game_logos') class League(models.Model): game ...

Tips for updating the color of an active navbar:

<div class="collapse navbar-collapse" id="navbarSupportedContent"> <ul class="navbar-nav me-auto mb-2 mb-lg-0"> <li class="nav-item mx-4"> <a class="nav-l ...

Ways to solely add effect to background image without affecting text

I'm on a quest to find a way to create a CSS effect that only applies to an image, excluding the letters and buttons. I need to establish a rule in my CSS without altering the current structure. The issue arises when my code ends up applying the effec ...