D
D
denism3002019-01-18 10:41:07
css
denism300, 2019-01-18 10:41:07

How to wrap lines?

there is a design:

<a href="/catalog/tovar-detail" rel="prev" class="btn btn-outline-primary d-block d-md-inline-block mb-2 mb-md-0 previousPage" data-dynamic-update="1">Тут очень длинное название товара, которое не помещается</a>

styles standard, BS-4
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border: 1px solid transparent;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: .25rem;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

How can I force text to wrap to a new line?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FuriKuri, 2019-01-18
@FuriKuri

Remove the 'white-space' property.

N
NaN, 2019-01-18
@KornevaViktoria

Write your own class to override the bootstrap styles, in which to set the white-space: normal property

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question