Back
I want to change the color of my hr tag using CSS. The code I've tried below doesn't seem to work:
hr { color: #123455;}
hr {
color: #123455;
}
Try using border-color instead of color, if you want to change the color of the line produced by <hr> tag.
Code:
hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
hr { display: block; height: 1px;
border: 0; border-top: 1px solid #ccc;
margin: 1em 0; padding: 0; }
For more information, you can refer to https://github.com/paulirish/html5-boilerplate/blob/ef3c095bafa9a6fa9c771f368d4b30c8ce4deded/css/style.css#L75
31k questions
32.8k answers
501 comments
693 users