Skip to content

Instantly share code, notes, and snippets.

@voidove
Last active August 29, 2015 14:16
Show Gist options
  • Save voidove/d7ea46d3a0b20da6c404 to your computer and use it in GitHub Desktop.
Save voidove/d7ea46d3a0b20da6c404 to your computer and use it in GitHub Desktop.
relative position
/**
* relative position
*/
.box-set {
background: #e8eae9;
color:#fff;
}
.box {
background: #8ec63f;
height: 80px;
width: 80px;
border-radius: 5px;
line-height:80px;
text-align:center;
}
.box-1 {
position: relative;
top: 20px;
}
.box-2 {
position: relative;
right: 20px;
}
<div class="box-set">
<div class="box box-1">Box 1</div>
<div class="box box-2">Box 2</div>
<div class="box box-3">Box 3</div>
</div>
// alert('Hello world!');
{"view":"separate","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