Answer the question
In order to leave comments, you need to log in
How to limit the number of characters in a Joomla module title?
I need to limit the number of characters in the latest news and events output module so that it ends with "... " I was thinking about doing this with JS, but I'm not very familiar with it yet.
Answer the question
In order to leave comments, you need to log in
text overflow
p.clip {
white-space: nowrap; /* Запрещаем перенос строк */
overflow: hidden; /* Обрезаем все, что не помещается в область */
background: #fc0; /* Цвет фона */
padding: 5px; /* Поля вокруг текста */
text-overflow: ellipsis; /* Добавляем многоточие */
}
<p class="clip">Магнитное поле ничтожно гасит большой круг небесной сферы,
в таком случае эксцентриситеты и наклоны орбит возрастают.</p>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question