Линия по середине текста

<div class="container">
    <hr/>
    <div class="text1">Мой любой текст и он тянет белый фон</div>
    <div class="text2">8 800 800 80 80</div>
</div>
.container {
    position: relative;
    padding-top: 30px;
}
.text1 {
    position: absolute;
    left: 40px;
    top: 29px;
    background: #fff;
    padding: 0 10px;
}
.text2 {
    position: absolute;
    right: 40px;
    top: 29px;
    background: #fff;
    padding: 0 10px;
}

ИТОГ:


Мой любой текст и он тянет белый фон
8 800 800 80 80
Найдено тут:https://toster.ru/q/46324

Оставить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *