How do you change length of an hr tag?

bs5alpha

How do you change length of an hr tag?

<hr>

Takes the full length of the browser. I tried setting padding and margin but no effect. Any solution for this using plain css or using Bootstrap 5?

Ak47

You need to set margin for the hr tag. The following would work

hr {
  margin: auto 220px
}


/* just for demo*/
.div {
  text-align: center;
  margin: 20px;
}
<div class='div'> div - 1</div>

<hr>

<div class='div'> div - 2</div>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related