In my React code, I am trying to create a border using the following code:
<hr className="borderLine" />
However, when I attempt to style it with CSS, I utilize this snippet of code:
.divider {
margin: 2rem;
width: 100%;
color: white;
border: 1px solid white; /* Adjust the color and style as needed */
}
The problem arises when I assign the .borderLine
class in the CSS. The hr
line only appears on the page when I use .divider
, even though there is no existing class named .divider
.
I have attempted changing all instances of className
, without success. The border only becomes visible when utilizing .divider
, regardless of any alterations made or cache clearing attempts.