Skip to content

Instantly share code, notes, and snippets.

@i2r
Last active February 19, 2020 06:59
Show Gist options
  • Save i2r/209f14da22f3b53a903db20831ee92a0 to your computer and use it in GitHub Desktop.
Save i2r/209f14da22f3b53a903db20831ee92a0 to your computer and use it in GitHub Desktop.
Sticky Bottom
/**
* Sticky Bottom
*/
html, body {
font-family: sans-serif;
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
}
html {
/*height: 100%;*/
}
body {
margin: 0;
padding: 100px 100px 50%;
}
.box {
background: green;
box-sizing: border-box;
border: dashed 3px rgba(255,255,255, 0.5);
}
.inner {
position: sticky;
right: 0;
bottom: 0;
color: white;
height: 1000px;
width: 30%;
box-sizing: border-box;
background: blue;
border: dashed 3px;
}
.content {
height: 3000px;
width: 65%;
color: #fff;
box-sizing: border-box;
background: red;
border: dashed 3px;
}
.content,
.inner {
display: inline-block;
padding: 10px;
vertical-align: bottom;
letter-spacing: 1px;
}
<div class="box">
<div class="content">CONTENT<b>COLUMN</b></div>
<div class="inner">STICKY<b>BOTTOM</b></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