I have an ASP.Net page i am developing. I am using bootstrap and that is working fine. I also have a custom stylesheet i use to fine tune the look and feel. As of some point in the last 2 days, any new classes i create in the custom stylesheet and try to apply to an element on my page fails to make a change. For example, i have a div on a page, a basic div i created to troubleshoot this issue, even though this applies to any element on the page, that i am trying to change the background color for. I created one css class ".background-pink" a couple days ago and if i set my div to use that class, the div turns pink like it is supposed to. However, i have another class right below that class in the stylesheet called .background-blue that does the same thing,it even sets the background to the same color(it was originally blue but during testing i changed it to the same color as the background-pink class to narrow down the issues) and if i change the div class to reference the .background-blue class, the pink background disappears and the style is not applied. I can then set the class back to the pink one and it changes back pink just fine. This is replicated across any newly created classes in my stylesheet.
I have tried clearing browser caches and tried incognito modes, different browsers with all the same results. I have checked for syntax errors in my css but found none. The intelliprompt in Visual studio can find the class names fine, leading me to believe i have it linked in the head correctly. I have renamed the stylesheet but no change. I have cleaned and rebuilt the application multiple times with no results. If i put the styles in the div using inline css it works fine.
This makes no sense to me, any suggestions would be appreciated. Thanks!
.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 entire 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;
}
Note the body method, the font throughout the page is set correctly, but the background color i put to test that method made no change either.