how to stick a text to a div in css

Solutions on MaxInterview for how to stick a text to a div in css by the best coders in the world

showing results for - "how to stick a text to a div in css"
Helena
28 Mar 2016
1<!-- CSS Style -->
2
3<style>
4  .stick{
5    width: 100px;
6    height: 100px;
7    position: absolute;
8    background-color: blue;
9    
10  }
11  .stick::after{
12    content:'A Stuck Word';
13    position: absolute;
14    top: 110px;
15  }
16</style>
17<!-- CSS Style -->
18
19
20<div class="stick"></div>