Hello, I am new to CSS and I have encountered an issue with setting the height of a div element to 100%. When the list on my page exceeds the size of the page, the div is no longer visible when scrolling. Do you have any ideas on how to fix this? Here is the code snippet:
@{Layout = null;}
@model WebRole1.Models.RightsModel
@{
ViewBag.Title = "AddRights";
}
<html style="background-color:#FFFFFF">
<head>
<meta charset="utf-8" />
<title>@ViewBag.Title - My ASP.NET MVC Application</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta name="viewport" content="width=device-width" />
@Styles.Render("~/Content/Site1.css")
<script>
function myfunc() {
document.getElementById('mydiv2').style.display = "block";
}
function hideview() {
document.getElementById('mydiv2').style.display = "none";
}
// Other JavaScript functions here...
</script>
This section contains some HTML and Razor syntax used in the web application.
// More HTML code...
// Embedded C# logic for form submission...
In my attempts to solve the visibility issue by setting the bottom property to 0px, I was unsuccessful. The blue div element is not staying visible when scrolling, as illustrated in the image provided below:
...