V
V
Valiety2016-07-07 21:27:45
HTML
Valiety, 2016-07-07 21:27:45

How to insert text in a column?

56929db28ade4b5aa757000e3931fb96.pngThis question may seem very simple to you, but it was not possible to find an answer to it. I'm trying to insert text into a file (a verse in a column), and it translates everything into a line version. Very inconvenient, tell me how to fix it.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
AlexanderShustik, 2016-07-07
@AlexanderShustik

<style>
.verse {
  display: table;
  margin: 0 auto; /* для центрирования display: table; не нужно указывать ширину блока, она рассчитывается самостоятельно */ 
  white-space: pre-line; /* не нужен <br> */ 
  word-wrap: break-word; /* чтобы слова переносились на маленьком экране */ 
}
</style>

<div class="verse">У лукоморья дуб зелёный;
Златая цепь на дубе том:
И днём и ночью кот учёный
Всё ходит по цепи кругом;
Идёт направо - песнь заводит,
Налево - сказку говорит.
</div>

First link on google

P
Pyotr Popov, 2016-07-07
@FreedomRun

maybe splitting the strings with <br>it will suit you

A
Alexander Ruzhevich, 2016-07-08
@ruzhevich

well, as you wanted, this is html markup, it works like this and starts a new line only if you ask it to, well, or if it hits the block border, for the beauty of the verse, use

<p>
столбик 1
</p>

<p>
столбик 2
</p>

well, divide the lines as they wrote to you, <br>
it will come out something like
<p>
строчка1<br>
строчка2<br>
строчка3<br>
строчка4<br>
</p>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question