Skip to content

Instantly share code, notes, and snippets.

@revolunet
Created May 23, 2013 12:17
Show Gist options
  • Select an option

  • Save revolunet/5635652 to your computer and use it in GitHub Desktop.

Select an option

Save revolunet/5635652 to your computer and use it in GitHub Desktop.
absolute positionned children
/**
* absolute positionned children
*/
.d1 {
top:60px;
width:30%;
height:0;
background:pink;
vertical-align:bottom;
display: inline-block;
position: relative;
}
.d2 {
width:100%;
padding:5px;
background:yellow;
position:absolute;
bottom:0px;
height:50px;
}
<!-- content to be placed inside <body>…</body> -->
<div class="d1">
<div class="d2">
as an absolute positionned children, this element is still visible even when parent has height=0;
</div>
</div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment