Skip to content

Instantly share code, notes, and snippets.

@gavin19
Created September 5, 2013 16:22
Show Gist options
  • Save gavin19/6452500 to your computer and use it in GitHub Desktop.
Save gavin19/6452500 to your computer and use it in GitHub Desktop.
top 100% vs bottom 0 *
/** top 100% vs bottom 0 **/
div {
position: relative;
display: inline-block;
height: 200px;
width: 200px;
background: rgba(0,0,0,.5);
margin: 5px 0;
}
#top div, #bottom div {
position: absolute;
height: 50px;
width: 90px;
background: #f00;
}
#top div {
top: 100%;
}
#bottom div {
bottom: 0;
}
<div id="top">
<div>top 100%</div>
</div>
<div id="bottom">
<div>bottom 0</div>
</div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment