After downloading a free bootstrap template, I attempted to change the style using a custom CSS file. However, the CSS in the template did not adjust as expected. Changing background colors and text colors had no effect. Why isn't this working? Could the template be blocking changes?
This is just a small example, the CSS and HTML files are too large to upload.
<!DOCTYPE html>
<head>
<link rel="stylesheet" href="assets/css/style.css" />
<link rel="stylesheet" href="assets/css/custom.css" />
</head>
<body>
<div class="container">
<div class="col-lg-4 my-3">
<div class="card hover-top">
<div class="card-body">
<span class="bg-white font-w-500 py-1 lh-1 me-1 mb-1">
change style text
</span>
<div class="d-flex align-items-end pt-4">
<div class="display-7 m-0 font-w-700 lh-1">Display Text</div>
</div>
</div>
</div>
</div>
</div>
/** style.css **/
/********** Template CSS **********/
.card {
position: relative;
display: flex;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-color: #ffffff;
background-clip: border-box;
border: 0 solid #eff2f7;
border-radius: 0.3rem; }
.card > hr {
margin-right: 0;
margin-left: 0; }
.card > .list-group {
border-top: inherit;
border-bottom: inherit; }
.card > .list-group:first-child {
border-top-width: 0;
border-top-left-radius: 0.3rem;
border-top-right-radius: 0.3rem; }
.card > .list-group:last-child {
border-bottom-width: 0;
border-bottom-right-radius: 0.3rem;
border-bottom-left-radius: 0.3rem; }
.card > .card-header + .list-group,
.card > .list-group + .card-footer {
border-top: 0; }
.card-body {
flex: 1 1 auto;
padding: 1.75rem 1.75rem; }
.card-title {
margin-bottom: 0.5rem; }
.card-subtitle {
margin-top: -0.25rem;
margin-bottom: 0; }
.card-text:last-child {
margin-bottom: 0; }
.card-link + .card-link {
margin-left: 1.75rem; }
.card-header {
padding: 0.875rem 1.75rem;
margin-bottom: 0;
background-color: transparent;
border-bottom: 0 solid #eff2f7; }
.card-header:first-child {
border-radius: 0.3rem 0.3rem 0 0; }
.card-footer {
padding: 0.875rem 1.75rem;
background-color: transparent;
border-top: 0 solid #eff2f7; }
.card-footer:last-child {
border-radius: 0 0 0.3rem 0.3rem; }
/** custom.css try this **/
.newtextstyle{
color: red;
font-size:1.5em;
}
/** custom.css and this **/
.newtextstyle{
color: red !important;
font-size:1.5em !important;
}
/* try to change this with no effect */
<span class="bg-white font-w-500 py-1 lh-1 me-1 mb-1 newtextstyle">
change style text
</span>