Sticky footer doesn't work on angular application using a flex layout technique

22 views Asked by At

I can't make the footer stick to the end of the page when the main "content" is not enough to put it at the bottom.

enter image description here

My dom is like this.

enter image description here

My CSS is like this.

  body {
  min-height: 100%;
  display:flex;
  flex-direction: column;
}

html {
  height:100%;
}

main {

  flex: 1 0 auto;
    
}

footer {
  background-color:red;
}


  


  .error {

    border: 1px solid red;

  }

  a {
      color:blue;
      text-decoration: none;
  }
0

There are 0 answers