Note that there are some explanatory texts on larger screens.

plurals
  1. POAbsolute Positioned Footer In Relative Positioned Container
    primarykey
    data
    text
    <p>I know versions of this question have been asked many, many times. I know because I think I read almost every one of them in the past 4 hours.</p> <p>Nowhere have I seen an answer for this.</p> <p>The issue I am having is this: I have a template, while otherwise very functional, allows very limited control over the code. I can, however, play with the css. Now there are a few items that are used near the header which i need down, just below the footer.</p> <p>I have a wrapper to work work with which I have relatively positioned, and have absolute positioned the containing the items I need below the footer.</p> <p>This works extremely well with:</p> <pre><code>.referencepositionwrapper { position: relative; } .absolutepositioncontainer { position: absolute; bottom: -144px; } </code></pre> <p>but <em>only when</em> the items to be lowered are about 136 pixels in height.</p> <p>Here's the rub. The content that I need moved below the footer is dynamic. Sometimes it's 136px tall, sometimes 36px. Sometimes it's 300px tall.</p> <p>Currently, the absolute positioned item references the bottom of the wrapper and container so when the container height changes, things get wonky.</p> <p>Is there a way to use the bottom of the wrapper and the top of the container so there isn't a massive deadspace between or overlap of the two elements?</p> <p>Thank you so much, any help would be greatly appreciated.</p> <hr> <p>Context as requested.</p> <p>In the example I gave for the absolute class:</p> <pre><code>bottom:-144px; </code></pre> <p>creates 144px distance between the <strong>bottom</strong> of the relative and the <strong>bottom</strong> of the absolute </p> <p>Which is ok when the footer is only 136px tall. There is a reasonable amount of space in between the two elements, about 8px. But the absolute varies in height on different pages.</p> <p>So, when the footer contains more data, say enough to make the absolute 300px tall, there is 156px of overlap. When there is less data, say only enough to make the absolute 36px tall, there is a "dead space" of 108px.</p> <p>I want to find a way to define a distance, say 36px, between the <strong>bottom</strong> of the relative and the <strong>top</strong> of the absolute .</p> <p>That way regardless of how much extra data is in the absolute , there is only 36px in between the relative and the absolute.</p> <p>Thanks for the comment. Hope this helps. Let me know if you need any other info.</p>
    singulars
    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.
    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