I am in the process of developing an ASP.Net page and utilizing Bootstrap, which has been functioning properly. Additionally, I have integrated a custom stylesheet to refine the appearance of the page. However, within the last couple of days, any new classes created in the custom stylesheet fail to apply changes to elements on the page. For instance, I have a basic div element on the page that I am attempting to change the background color for. Despite creating a CSS class ".background-pink" that successfully turns the div pink, a subsequent class ".background-blue" in the stylesheet fails to apply the style when assigned to the div. This issue persists across all newly created classes in the stylesheet.
I have attempted various troubleshooting steps such as clearing browser caches, using incognito modes, and testing on different browsers with no success. Syntax errors in the CSS have been ruled out, as the class names are recognized by the intelliprompt in Visual Studio. Renaming the stylesheet and rebuilding the application also did not resolve the issue. Interestingly, applying the styles inline to the div works without any problems.
This problem is quite perplexing to me, and any suggestions or insights would be greatly appreciated. Thank you!
.background-pink {
background-color: #E33491;
}
.background-blue {
background-color: blue;
}
.font-white {
color: white;
}
<div class="background-blue">test</div>
<div class="background-pink">test</div>
<div style="background-color:blue">test</div>
Below is the complete stylesheet:
.negativetopmargin {
margin-top: -5px;
}
.background-pink {
background-color: #E33491;
}
.background-blue {
background-color: #E33491;
}
.font-white {
color: white;
}
.center-div {
position: relative;
margin-left: auto;
margin-right: auto;
}
body {
font-family: 'Palanquin', sans-serif;
background-color: red;
}
.padding-4 {
padding: 4px;
}
It is worth noting that the font settings throughout the page are correct according to the body method, but changes to the background color have not been successful.