M
M
mukzer2021-07-16 13:56:51
css
mukzer, 2021-07-16 13:56:51

How to make such lines on the sides of the text?

How to make such horizontal gray lines near the text? (Responsive)
60f1657f20642219095298.jpeg
https://codepen.io/Mukzer/pen/jOmmPBy?editors=0100

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shuklin, 2021-07-17
@Anton_Shuklin

You can do this:
add two elements
between these elements make a block with text
place all elements using flexbox
HTML:
div class="container"
hr
div class="text"Kitchen of your choice/div
hr/
/div
CSS:
.container{
display:flex;
justify-content: space-around
}
.line{
width: width of your choice;
color: red;
}
.text{
padding: 0
}
UPD: removed the < and > symbols, since the tags are not displayed in the response

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question