2
To div one-page HTML this breaking when the text size of one of the labels I have inside it is very large, I am using the following code:
<div class="divRelato" style="background-color: #eee">
<label>Detalhes físicos Detalhes físicosDetalhes físicosDetalhes físicosDetalhes físicosDetalhes físicosDetalhes físicosDetalhes físicosDetalhes físicos</label>
<label class="lblHoraImpacto" style="float: right;color:#999;margin-right: 0px">12-12-2016 13:30</label><br>
</div>
The result with the label with little content is this:
Already the label with large content breaks, returning:
I believe that when the second label (date and time) is "played" to the next line, the div should expand along. This behavior does not happen with the use of paragraphs.
I’m away from the PC, but research CSS on nobr.
– Wilson Rosa Gomes
Have any css applied to div? If yes post it please
– Leo Letto
@Leandro J. S. Paiva Have you tried to create a "Table" inside the div ?
– AndreeH
Import the bootstrap and use the grid system. https://v4-alpha.getbootstrap.com/layout/grid/
– Rafael Salgado
Change the above code to simulate the problem. The Current does not happen. And by chance you have another
div
on the outside, each message is insidediv``divRelato
?– David
uses flexbox to adjust the time at the end of the div and leave the behavior as if it were table
– Felipe Duarte
Ta, what is the doubt?
– Renan Gomes