Any way to limit border length?

CSS generated content can solve this for you:

div {
  position: relative;
}


/* Main div for border to extend to 50% from bottom left corner */

div:after {
  content: "";
  background: black;
  position: absolute;
  bottom: 0;
  left: 0;
  height: 50%;
  width: 1px;
}
<div>Lorem Ipsum</div>

(note – the content: ""; declaration is necessary in order for the pseudo-element to render)

Leave a Comment