I would like to replace horizontal line rendered by default by the <hr>
tag with three asterisks (horizontally centered). If possible, I want to achieve this with pure CSS, specifically:
<hr>
, no helper divs or anything like this (because I'm styling Markdown files);First I tried:
hr {
width: 0;
}
hr:before {
content: "***";
}
and it almost does the trick, but I want it centered, and have no idea how to center it.
Browsers display <hr>
s using borders, so:
hr {
border: none;
}
hr::before {
content: '***';
display: block;
text-align: center;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With