I am using Asp.Net/C#.Currently I am working on the Login page,My login page is not dependent on the Master Page , and therefore the Link to Stylesheet I have set in the head section
<link rel="stylesheet" href="Styles/Login.css" type="text/css"/>
The problem is that the styles are not having any efeect on my controls on the login page.Here is my css file
body
{
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size:75%;
}
#loginbox
{
position:fixed;
background-color:#9cc3f7;
border:2px solid #ddd;
height:200px;
width:300px;
top:50%;
margin-left: -130px;
margin-top: -100px;
left:50%;
}
Here is the login page
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HomeLogin.aspx.cs" Inherits="CwizBankApp.HomeLogin" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Comwizard Systems | Login</title>
<link rel="stylesheet" href="Styles/Login.css" type="text/css"/>
</head>
<body>
<form id="form1" runat="server">
<div id="loginbox">
<span>UserName:</span><asp:TextBox ID="txtUserName" runat="server"></asp:TextBox> <br />
<span style="margin-left:6px;">Password:</span><asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox><br />
<asp:Button ID="cmdLogin" runat="server" Text="Login" onclick="cmdLogin_Click" />
</div>
</form>
</body>
</html>
Can anybody help me with this.
Any suggestions are highly appreciated.
Thanks
Finally The issue has been solved
Adding this in the web.config solved it
<location path="~/Styles">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
try this
please update the path with your Style sheet path….Refer to this article
http://forums.asp.net/t/1678658.aspx/1