body { margin:0; } .list { padding:2px; width:100%; } .list-item { padding:2px; width:100%; margin:2px; background-color:#ccc; &:nth-child(2) { background-color:yellow; } } .list-2 .list-item { &:nth-child(2) { position:sticky; top:20px; } } .list-3 { position:relative; .list-item { &:nth-child(2) { position:absolute; top:20px; background-color:red; } } } .list-1 .list-item { &:nth-child(2) { position:relative; top:10px; left:10px; } } .list-5 { margin:0; padding:0; .list-item { display: inline-block; width: calc(25% - 4px); margin: 0; box-sizing: border-box; padding: 5px; border: solid 1px blue; margin: 2px; } } .box { display:block; background-color:#ccc; position:absolute; //top:-1000px; left:0; } .box-2 { display:block; background-color:#ccc; position:fixed; //top:-1000px; left:230px; } .cols { padding:2px; background-color: blue; //hack "clearfix" display: table; width: 100%; box-sizing: border-box; .col1 { float:right; background-color:yellow; } .col2 { float:left; background-color:green; } } .button { display:inline-block; border:solid 1px blue; color:blue; background-color: white; height:40px; padding:0px 10px; margin:2px; line-height:40px; box-sizing:border-box; } .conteneur { height:30vh; background-color:#ccc; display:table-cell; vertical-align:middle; .contenu{ margin:5px; background-color:white; } } .conteneur-2 { border-top:1px solid black; height:30vh; background-color:#ccc; position:relative; .contenu{ position:absolute; margin:5px; background-color:white; top:50%; transform: translateY(-50%); } }