Answer the question
In order to leave comments, you need to log in
How to implement decorative elements with after and before?
Tell me how to make this
code https://codepen.io/kiskiskit/pen/JjWBvNz
Answer the question
In order to leave comments, you need to log in
<div class="wrapper">
<h1 class="title">Заголовок</h1>
</div>
.wrapper {
position: relative;
z-index: 0;
display: flex;
justify-content: center;
}
.wrapper:after {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 1px;
width: 100%;
background-color: red;
z-index: -1;
margin: auto;
}
.title {
background-color: #fff;
padding: 0 10px;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question