I'm developing an ASP.NET
website with Visual Studio 2019
, C#
and .NET Framework 4.7
On the masterpage I have inserted this css class
because all my pages have vertical scrollbar and I want to show <footer>
always at the bottom of the page.
On the browsers Google Chrome
and Microsoft Edge
this css class
working correctly, but in browser Internet Explorer 11
the footer text moves along with the web page.
How can I do it?
footer{
position:fixed;
bottom:0;
}
<div>
<footer>
<p style="font-size:20px">My Company</p>
</footer>
</div>
It is actualy working fine all browser, just make sure that you set CSS correctly.
style
in head
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
.p{
height: 200vh;
background:red;
}
footer{
position:fixed;
bottom:0;
background: yellow;
}
</style>
</head>
<body>
<h1>This is a Heading</h1>
<p class="p">This is a paragraph.</p>
<div>
<footer>
<p style="font-size:20px">My Company</p>
</footer>
</div>
</body>
</html>