Change color of partition

Asked

Viewed 67 times

-3

How can I change the color of a "hr partition" "


" I tried the following codes in the CSS tab of the file:

.hr{
    color: #29303b;
}

hr{
    color: #29303b;
}

  • Hello, take a look at this material, https://www.w3schools.com/tags/tag_hr.asp

  • Bruno, the property color only applies to text. In the case of HR you would use the property border-color.

2 answers

2

Just change the color of the border-color: #sua-cor; See the example below.

You can still vary the border-style if you want a different room...

hr {
  border-color: #ff0000;
}
<hr>

<br>

<hr style="border-style: dotted;">

1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.