Apurv Jayakumar Apurv Jayakumar - 1 month ago 4
CSS Question

How to move a border below some text down?

Suppose I have a snippet like this.

h1 {
border-bottom: 10px black solid;

<h1>My name is Apujay.</h1>

How do I move the border right below the text down?


Take a look at this code.

You do not need a border-bottom property but a separate div.

div {
  background: black;
  height: 10px;
  margin-top: 100px; /*change this and you can solve it*/
<h1>My name is Bob.</h1>