break automatic line with database data

Asked

Viewed 54 times

1

Hi, I have a ul with li's who are named after products. It turns out that when I change the resolution to mobile, for example 320px, so if the name of the product is big, then it won’t fit inside the read that will have the 320px;

In that case, how can we not prever o tamanho de cada nome de produto that arrives at the bank, does there exist a form of text (product name) do break linha automática?

For example: the name

Manual, P212, 1 bandejas de 120cm x 70cm e prensagem de 200kg.

In a resolution above 860px, it fits tranaquilo, but below that it will be necessary to do for example:

Manual, P212, 1 bandejas de 120cm x 70cm
e prensagem de 200kg

1 answer

1

Try doing it through CSS, using @media for resolutions below 860px:

@media screen and (max-width: 860px) {
    .suaClasse{
        word-break: break-all;
    }
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.