CSS - border below heading

0 votes
44 views
added Feb 24, 2022 in CSS by lcjr First Warrant Officer (9,190 points)
h3 {
  position: relative;
  padding-bottom: 20px;
  &:after {
    content: "";
    position: absolute;
    width: 48px;
    height: 2px;
    background-color: rgba(0,0,0,.2);
    bottom: 0;
    left: calc(50% - 24px);
  }
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...