It looks like that:
hr {
position: relative;
border: none;
overflow: visible;
text-align: center;
width: 80%;
top: 3%;
left: 10%;
border-top: 3px solid #c7a175;
border-radius: 2px;
}
hr::after {
background-color: white;
content: '\f6ae';
font: var(--fa-font-solid);
padding: 0 6px;
position: relative;
top: -10px;
}
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
<hr>
</body>
I need the icon to appear normally. Even if I use div
to create a line, it won't work.
How to fix this?
` is a replaced element and as such is contentless. As such, pseudo-element such as `::before` and `::after` does not work on them. – tacoshy Apr 06 '23 at 11:42
. – Terraxin Apr 06 '23 at 12:00