Encountering issues with the interaction between Bootstrap and my custom CSS file in a Flask app with

I am encountering an issue with my template where I have included both Bootstrap and CSS files, with Bootstrap loaded before CSS. However, when I try to apply custom CSS using IDs or classes, the changes do not reflect. Strangely, styling for h1 elements is working as expected.

Here is the code snippet from my layout.html:

{% extends "layout.html" %}
{% block content %}
  ...
  <head>
    <!--Bootstrap CSS-->
    <link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e3818c8c979097918293a3d6cdd0cdd3ce828f938bgbh">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-aFq/bzH65dt+w6FI2ooMVUpc+21e0SRygnTpmBvdBgSdnuTN7QbdgL+OapgHtvPp" crossorigin="anonymous">
    <!--Bootstrap-picker -->
    <link href="{{ url_for('static', filename='bootstrap-timepicker/css/bootstrap-timepicker.min.css') }}" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css" integrity="sha512-mSYUmp1HYZDFaVKK//63EcZq4iFWFjxSL+Z3T/aCt4IO9Cejm03q3NKKYN6pFQzY0SBOr8h+eCIAZHPXcpZaNw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <!--Include my own css file-->
    <link href="{{url_for('static', filename='main.css')}}" rel="stylesheet">
  </head>
  ...
{% endblock content %}

My main.css file in the static folder contains the following:

h1 {
  color: #129944;
}
#my-image-main {
  width: 100px;
  height: 100px;
}

And here is a snippet from my .html file:

<div class="col">
  <img src="{{image}}" class="img-fluid rounded-circle border" id="my-image-main" alt="Profile picture">
</div>

Any suggestions or assistance would be greatly appreciated.

Answer №1

Update: Problem solved! I was able to resolve the issue by clearing my browser cache.

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 could be causing my image to be excessively left-aligned in Firefox compared to Chrome?

Having an issue with my code that is displaying differently in Firefox compared to Chrome. <h2>Introducing <span style="font-weight:bold">Analytics by </span> <div class="fi_logo"><img src="IMAGEURL" /></div> </h2& ...

As you scroll through the page, the menu gracefully descends alongside you

Having trouble with my menu navbar. Looking to make it stick to the top of the browser when scrolling down. Desired effect can be seen here: For residents, news, for tourists, about Gdynia, Any tips on how to modify my code to achieve this effect? Prev ...

Create a wait function that utilizes the promise method

I need to wait for the constructor() function, which contains an asynchronous method handled by Promise. My goal is to wait for two asynchronous methods within the constructor, and then wait for the constructor itself. However, my code is throwing an err ...

Determining the height of a different element using only CSS, Stylus, or Nib

Looking to create a navigation bar using CSS Markup: <nav> Navigation content </nav> <div id="mainContent"> Main page content </div> CSS: nav { position:fixed; height: X%; min-height: Ypx; } #mainContent { ...

Internet Explorer is automatically inserting extra vertical space after the first list item in a basic menu design

Does anyone else have trouble with IE? (Or is it just me?) I'm creating a list with a background. The first and last LI elements are 5px high, while the others are 16px high. However, in IE there's a strange blank space between the first and se ...

Issues with alignment within Bootstrap grid system

I have three unique "cards" that I want to display horizontally and center on the page without using the bootstrap card class. Currently, I am attempting to assign each of them a width of .col-lg-4 within an outer div set to full width. However, they are s ...

Disable automatic playback of HTML video

There is an HTML video with an image that loads initially and then disappears to play the video. I would like the image to always be visible until I click on it. Once clicked, the video should start playing. You can view the code on JSFiddle: http://jsf ...

jQuery iScroll: The scrolling feature does not stop when reaching the end of the content

Recently, I've been utilizing iScroll for horizontal scrolling on a list. At first, everything seems to be working fine, but as I scroll towards the end (right to left), the content reaches its conclusion yet the scrolling continues beyond that. I&apo ...

Tips for Displaying Bootstrap 5 Toasts in a React.js Application

Implementing a different strategy to display Bootstrap 5 Toast dynamically when a button is clicked in React.js Here is the import statement: import * as bootstrap from 'bootstrap'; Button click event handler: let toastEl = document.getElementB ...

javascript conceal other sections upon hovering

There are 4 list items (<li>) that I want to use as triggers for linked images. In this project, I am using vanilla JavaScript as jQuery is not allowed. Below is the code snippet: var children = document.querySelectorAll('#resistorContent > ...

Angular 13: A guide on pulling data from an Excel spreadsheet

I have been encountering issues while trying to display data from a CSV file on a web platform using Angular 13. The errors I am facing are related to binding 'ngModel' and type mismatches in the code. errors Error: src/app/app.component.html:24 ...

Adding padding to the navbar when collapsed causes extra space between the brand name and the hamburger icon button in Bootstrap

I am in the process of creating a fixed-top navigation bar for my webpage. However, I have encountered an issue where there is excessive space between the "Brand" name and the collapsed menu icon when viewed on smaller screens. Here is a visual representa ...

How can Angular CLI prevent the submission of an HTML form unless a previous option has been selected

I am currently working on a form that contains select fields with various options pre-populated. <form [formGroup]="selectVehicleForm"> <select formControlName="Manufacturer"> <option *ngFor='let ...

Changing the background color of the legend text when hovering over a d3 doughnut chart

I have a doughnut chart that displays values on mouse hover. However, I would like to change the background of the legend text when hovering over the respective area of the doughnut chart. return { restrict: 'E', scope: { values: ...

Building applications with Vue.js and Framework7 while incorporating the powerful Axios library

I am inexperienced with framework7 and vuejs. Can someone confirm if I am importing it correctly? Additionally, how can I make axios accessible from other pages? Here is my main.js file. I’m uncertain if the import process is accurate or if any steps ar ...

Would you like to justify to the right?

I am attempting to align the final element in a list to the right side: <ul> <li>one</li> <li>two</li> <li>three</li> <li id="right">right?</li> </ul> li { display: inline-bl ...

"Bootstrap4 - Troubleshooting the Issue of Multiple Carousels Not Function

I attempted to incorporate 2 Bootstrap 4 carousels onto a single page, but encountered issues with the functionality. I utilized this code on my page, however, the last element in the carousel does not cycle correctly. There is a delay of 3 transactions be ...

Prevent table headers from scrolling in Bootstrap Vue by following these steps

Just starting out with bootstrap vue and I've been using version 1.4 for my application. I've utilized b-table for displaying my data, but I'm encountering a problem where the table headers also scroll along with the content. I'd like t ...

Why is External Interface in Flash no longer supported in IE11?

Snippet Query: <object id="myMovie" name="myMovie" type="application/x-shockwave-flash" width="100%" height="100%" data="swf/myMovie.swf"> <param name="movie" value="swf/myMovie.swf" /> <param name="allowFullScreen" value="true" /&g ...

How to Turn Off Hover Effect in Essential Grid for Mobile Devices

My website, tyloz.com, features four panels on the homepage that act as landing pages. These panels have a hover effect that also works on mobile devices. However, I am looking to disable the hover and double tap functionality specifically on phones. Is th ...