I'm experiencing an issue where a style isn't being applied when using an "ID" selector (#btnOK). However, if I switch the "#btnOK" to a ".btnOK" in the CSS file and use a class selector (.btnOK), the style is successfully applied.
Have any idea why this might be happening? The style shows up in design mode but not at runtime, despite the css file being found – otherwise the class wouldn't apply. Make sure there's a case sensitivity match on the ID.
On the webpage:
<link href = "CSS/CvCost.css" rel="stylesheet" type ="text/css"/>
<asp:Button ID="btnOK" CssClass="btnOK" runat="server" Text="OK" ValidationGroup="Add"/>
In CSS/CvCost.css:
. btnOK {
margin-right: 5px;
margin-top: 5px;
float: right;
width: 75px;
height: 25px;
}