line divider css code example
Example 1: or separator css
<----------------------------- HTML ----------------------------------->
<div class="separator"></div>
<----------------------------- CSS ----------------------------------->
.separator {
width: 100%;
border-bottom: solid 1px;
position: relative;
margin: 30px 0px;
}
.separator::before {
content: "OR";
position: absolute;
left: 47%;
top: -8px;
background-color: #fff;
padding: 0px 10px;
}
Example 2: how to draw a horizontal line in javascript
var elem = document.createElement("hr");
elem.setAttribute("width", "100px");
document.body.appendChild(elem);