0

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>
2

1 Answer 1

0

It is actualy working fine all browser, just make sure that you set CSS correctly.

  • CSS in style in head
  • CSS inline

DEMO:

<!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>

Result on IE11 (you can I scrolled because half of title):

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.