Line Number for code html css js, only pure css

Line Number for code html css js, only pure css

by Adi Jaya

HTML

<div class="pretype-wrap">
<ul class="pretype">
  <li>Your <span class="tes">text</span> </li>
  <li>dfsdf fsdfsdfsdf dfdf sdfsdfdfsdfsdf dfsdf</li>
  <li>dfsdf fsdfsdfsdf dfdf sdfsdfdfsdfsdf dfsdf</li>
  <li>dfsdf fsdfsdfsdf dfdf sdfsdfdfsdfsdf dfsdf</li>
  <li>dfsdf fsdfsdfsdf dfdf sdfsdfdfsdfsdf dfsdf</li>
</ul>
</div>

<div class="pre-code">
asasdas asas asdasd asasdas asdasd asdasd asdasd asdasd asasd asdas asdas asdas asdasd asdasd asdas asdasd asdasd sdfsdf sdfsdf sdfsd sdfsdf sdfsdf sdfsdf sdfsdf sdf
</div>

CSS

.pretype-wrap {
    border-left: none;
    border-top: 5px solid #555555;
    border-bottom: 5px solid #555555;
    border-right: 5px solid #555555;
    background: #555555;
    margin: 10px 0px;
    box-shadow: 0px 0px 10px 1px #7f7f7f;
}
.pretype {
    position: relative;
    margin: 0px;
    padding: 0px;
    background: #0f0f0f;
    color: #9c9c9c;
    line-height: 1.42857143;
    word-break: break-all;
    word-wrap: break-word;
    font-size: 16px;
    list-style-type: none;
    display: block;
}
.pretype li {
    position: relative;
    counter-increment: number;
    padding-left: 50px;
    font-family: Menlo,Monaco,Consolas,"Courier New",monospace;
    font-size: 15px;
}
.pretype li:before {
    width: 30px;
    height: 100%;
    left: 0;
    position: absolute;
    margin-right: 10px;
    padding-right: 8px;
    background: #555555;
    color: white;
    text-align: right;
    content: counter(number)'';
    border-right: 2px solid #314151;
    box-sizing: content-box;
}

.tes {
  color : yellow;
}


/*div.pre-code*/
div.pre-code {
    position: relative;
    font-family: arial;
    background: #0f0f0f;
    color: #9c9c9c;
    padding: 15px;
    border: 4px solid #555555;
    border-radius: 4px;
    margin: 10px 0px;
    box-shadow: 0px 0px 10px 1px #7f7f7f;
}