How do you put the text in the middle of the block?



  • Hello! How do you do that?

    There's an idea to use the frame as background-image and verbally write the text in html.

    Any other options?



  • This can be achieved by a combination of tags https://webref.ru/html/fieldset and https://webref.ru/html/legend :

    legend {
      text-align: center;
    }
    <fieldset>
      <legend>Заголовок</legend>
      Текст текст текст
    </fieldset>


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2