Hello, I am working on an Ember application and trying to implement a Sticky Footer feature. I followed a tutorial on Sticky Footer On CSS-Tricks which worked for me previously, but it seems to not work with Ember.
Here is my CSS code:
.mainFooter {
height:100px;
color:white;
background-color: #0c2635;
text-align:center;
}
.wrapper {
min-height: 100%;
margin-bottom: -100px;
}
.wrapper:after {
content: "";
display: block;
}
.mainFooter, .wrapper:after {
height: 100px;
}
This is snippet from my HTML:
<footer class="mainFooter">
SOME TEXT
</footer>
I inspected the source code using Developer Tools and noticed that Ember adds its own wrapper around the content from the application.hbs file, which includes a class called ember-view. So, I tried this:
.ember-view {
min-height: 100%;
}
Unfortunately, this did not resolve the issue as the footer appears in the middle of the page. Has anyone successfully implemented a Sticky Footer in an Ember app before? I would appreciate any suggestions to fix this problem.
I have uploaded the app to my server since I am not sure how to create an Ember demo on jsfiddle/codeopen. Here is the link:
EDIT
Following the suggestion by user kumkanillam, I made some changes:
In Application.hbs:
{{outlet "modal"}}
{{partial "header"}}
<div id="gif" class="wrapper">
{{outlet}}
</div>
{{partial "footer"}}
In app.js:
App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
rootElement: '#gif',
Resolver
});
However, I encountered this error in the console:
ember.debug.js:43272Uncaught TypeError: Cannot read property 'tagName' of undefined
Can someone help me figure out what went wrong?