Linebreaks django and html


I have the following code in a django template

<div style="background-color:#F1948A;padding:0;border-radius:5px;margin:2;">
        <p style="margin-left:10;">{{ post.texto }}</p>

The post.text can be of 5 characters or of 1000, when it is of many characters it leaves the div, and the text continues making the enormous page. How could I do it so that it stays inside the div and does the linebreak to not get out?

asked by ImHarvol 03.08.2017 в 12:40

1 answer


I think django has little to do here, the question is to fix it with css, here is an example to see if it works:


answered by 03.08.2017 / 12:56