Here is a sample code . What is wrong?

#.note_box{ padding: 3px; border: 1px dotted #ffc539; background-color: #ffdbdf; margin-top: 3px; float: left; width: 100%; text-align: left; } 

    2 answers 2

    Because the fact that you have put all the entries in a new line in the code means nothing. It is still perceived as one line. Here is one of the fixes.

     .note_box{ padding: 3px; border: 1px dotted #ffc539; background-color: #ffdbdf; margin-top: 3px; float: left; width: 100px; text-align: left; } span {display:block;} 
     <div class="note_box"> <span>22.12.2016 15:42 Загружен реестр ИМ</span> <span>23.12.2016 17:00 Передано на сортировку</span> <span>24.12.2016 02:16 Принято к доставке</span> <span>24.12.2016 07:12 Отправлено в город назначения</span> </div> 

    • thanks, I suffered for 2 hours) - netoniel
    1. All in one line.
    2. Error in #.note_box styles - you need to remove the grid.
    3. For the transfer of lines, you can use the tag br - sets the line break in the place where this tag is located .

     .note_box{ padding: 3px; border: 1px dotted #ffc539; background-color: #ffdbdf; margin-top: 3px; float: left; width: 100px; text-align: left; } 
     <div class="note_box"> 22.12.2016 15:42 Загружен реестр ИМ <br> 23.12.2016 17:00 Передано на сортировку <br> 24.12.2016 02:16 Принято к доставке <br> 24.12.2016 07:12 Отправлено в город назначения <br> </div> 

    • one
      thanks, with <span> solved the problem - netoniel