I'm trying to create a sticky footer with angular material and flexbox. It looks like I have succeeded using flex-grow: 1 !important; on my main content element, but it only works as long as I use that code on the element with a style="" property. Other options to apply the same rules do not work:
- Applying the CSS in an external file (even with
!important) - Applying the CSS in a style element (even with
!important) - Using flex properties in the element like
flex="none" flex-grow"1"
It looks like either angularJS or Angular Material overrides my settings except for the style="" property. How can I change this behavior?
I'm suspecting the Angular Material javascript to set my flex-grow property to 0, while I want it to be 1, because the property is always at 0 on page load, no matter what I try with CSS and flex properties. Am I right? Is there a good reason for this?
EDIT: I have found multiple examples on how to create a sticky footer, but they all don't work for me. The single solution I have found is the one with a style property mentioned above and I would like a simpler solution.
For example, I cant get this one to work because it would set the flex-grow value to 0.