Note that there are some explanatory texts on larger screens.

plurals
  1. POEmber view height
    primarykey
    data
    text
    <p>I'm trying to get the root view for my Ember application to have full (100%) height, unsuccessfully so far.</p> <p>Why do I need that? I have a footer which I want aligned to the bottom even if the page content doesn't fill the whole height. To that end, I have the following CSS:</p> <pre><code>.push { height: 60px; } .content { min-height: 100%; height: auto !important; height: 100%; margin: 0 auto -60px; } </code></pre> <p>And HTML (using Twitter Bootstrap):</p> <pre><code>&lt;body&gt; &lt;div class="navbar navbar-fixed-top"&gt;&lt;!-- ... --&gt;&lt;/div&gt; &lt;div class="content"&gt; &lt;div class="push"&gt;&lt;!--//--&gt;&lt;/div&gt; &lt;div class="container"&gt; &lt;!-- page content --&gt; &lt;/div&gt; &lt;div class="push"&gt;&lt;!--//--&gt;&lt;/div&gt; &lt;/div&gt; &lt;footer&gt;Copyright ... 2013&lt;/footer&gt; &lt;/body&gt; </code></pre> <p>This works great without Ember. Now, introducing Ember:</p> <pre><code>&lt;script type="text/x-handlebars" data-template-name="application"&gt; &lt;div class="navbar navbar-fixed-top"&gt;&lt;!-- ... --&gt;&lt;/div&gt; &lt;div class="content"&gt; &lt;div class="push"&gt;&lt;!--//--&gt;&lt;/div&gt; &lt;div class="container"&gt; {{outlet}} &lt;/div&gt; &lt;div class="push"&gt;&lt;!--//--&gt;&lt;/div&gt; &lt;/div&gt; &lt;footer&gt;Copyright ... 2013&lt;/footer&gt; &lt;/script&gt; </code></pre> <p>And now it no longer works!</p> <p>The damn thing inserts a <code>&lt;div id="emberXYZ" class="ember-view"&gt;</code> which contains the whole thing, which by itself is quite fine, except that div doesn't have full height and the footer just hangs in the middle of the page right after the content.</p> <p>I googled around for a solution, but couldn't find anything that would allow me to work around this problem. My guess is the simplest way would be to have Ember set the root view to 100% height (can't seem to find how to do that), but maybe there's some other clever trick that will accomplish what I want. Whatever solution that is, I'd need it to be at least IE8-compatible.</p> <p>Thanks in advance!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload