<h6 class="dropdown-header">Популярные курорты</h6> 

My code, but it is just under a section to do

enter image description here An example of what to do.

    3 answers 3

     div { display: flex; flex-direction: row; justify-content: space-evenly; align-items: center; } div>hr { width: 200px; height: 1px; background: black; } 
     <div> <hr> <h6 class="dropdown-header">Популярные курорты</h6> <hr> </div> 

       .hr { display: flex; flex-basis: 100%; align-items: center; color: rgba(0, 0, 0, 0.35); margin: 8px 0px; } .hr::before, .hr::after { content: ""; flex-grow: 1; background: rgba(0, 0, 0, 0.35); height: 1px; font-size: 0px; line-height: 0px; margin: 0px 8px; } 
       <div class="hr">Популярные курорты</div> 

         <div class="block"> <h6 class="dropdown-header">Популярные курорты</h6> </div> 


         .block { text-align: center; } .dropdown-header { position: relative; margin: 0; padding: 0 15px; display: inline-block; } .dropdown-header:before { content: ''; position: absolute; top: 50%; left: 100%; width: 150px; height: 1px; background: #000; } .dropdown-header:after { content: ''; position: absolute; top: 50%; right: 100%; width: 150px; height: 1px; background: #000; }