Apurv Jayakumar Apurv Jayakumar - 1 year ago 68
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?

Answer Source

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>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download