Within my project directory, I have the following files:
style.css
located in the Content folder, as well as
image.jpg
found in the Images folder.
https://i.sstatic.net/IKArS.jpg
The default page is Login.aspx.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="LoginDemo.Login" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="~/Content/style.css" rel="stylesheet" type="text/css" media="screen" runat="server" />
<title>LOGIN</title>
</head>
<body>
</body>
</html>
Additionally, here is the CSS code:
*{
margin:0px;
padding:0px;
}
body{
background-image:url(Images/image.jpg);
background-size:cover;
background-attachment:fixed;
font-family:Times New Roman ;
}
Although the page loads successfully, the background image fails to load. I have researched various solutions but am still facing the issue. Any assistance would be greatly appreciated.