Как отключить перенос слов в css?

Пользователь

от clement.erdman , в категории: HTML/CSS , год назад

Как отключить перенос слов в css?

Facebook Vk Ok Twitter LinkedIn Telegram Whatsapp

1 ответ

Пользователь

от madelyn_hintz , год назад

@clement.erdman  Отключить перенос слов в css можно используя white-space: nowrap:


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <style>
      .word {
        width: 150px;
        height: 100px;
        background-color: crimson;
        white-space: nowrap;
      }
    </style>
  </head>
  <body>
    <div class="word">
      <p>Отключить перенос слов в css</p>
    </div>
  </body>
</html>