html - Make CSS popup always stay on top of it's parent -


i have 2 divs.

one position relative, , 1 position absolute.

they act somehow popup button.

is there way of forcing div position: absolute stay on top of it's parent, no matter height has?

on top mean "standing on top of it", not z-index property

jsfiddle example

<div style="position: relative; border: 1px solid #000; padding: 2px;">     <span>popup container</span>     <div style="position: absolute;">         <div style="height: 100px; background-color: #f0f0f0; top: 0;"></div>     </div> </div> 

sizes calculated based on container not itself

so need give

bottom:100%; 

demo @ http://jsfiddle.net/gaby/rhb3m/4/


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -