make border full length in css code example
Example 1: border width css
.element {
border-width: 2px;
}
Example 2: css border length
.page-title:after {
content: "";
display: block;
margin: 0 auto;
width: 50%;
padding-top: 20px;
border-bottom: 1px solid black;
}
Example 3: how to set border length in css without div
div {
width : 200px;
height : 50px;
position: relative;
z-index : 1;
background: #eee;
}
div:before {
content : "";
position: absolute;
left : 0;
bottom : 0;
height : 1px;
width : 50%;
border-bottom:1px solid magenta;
}