Linebreaks django and html

2

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>
</div>

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
source

1 answer

2

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:

link

    
answered by 03.08.2017 / 12:56
source