I have the code snippet below in the MasterPage.master file of my project:
<%= ConfigurationManager.AppSettings("System").ToString() %>
<asp:ContentPlaceHolder ID="Stylesheets" runat="server">
<link rel="Stylesheet" href="/App_Data/Styles/Site.css" type="text/css" />
</asp:ContentPlaceHolder>
<%
If (ConfigurationManager.AppSettings("Mode").ToString() = "TEST") Then
%>
<style type="text/css">
body {
background: #99cccc;
}
</style>
<%
End If
%>
I am looking to make a change from using this:
<%--<div style="text-align:center">--%>
to using this instead:
<div class="masterpagediv">
The CSS rule written in the stylesheet is as follows:
.masterpagediv {
text-align: center;
}
I suspect there may be an issue with how the CSS file location is referenced in the href attribute, which might explain why the styling rule is not taking effect on the tag.
This project did not utilize CSS prior to my involvement. Do I need to enable something in order to use CSS effectively?
Thank you.