Q:

Como fazer um wordwrap dentro de um ?

Eu tenho uma tag <pre>Oie</pre>
eu queria que esse texto ficasse com largura máxima de 595px word-wrap:break-word;
o que fiz foi o seguinte
pre {
width:595px;
word-wrap:break-word;

}

Eu faço isso , mas não acontece nada, eu simplesmente aperto faço isso
<pre>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</pre>

e o texto não quebra

A:

Use o estilo white-space, além do word-wrap: break-word;, para aplicar quebra de linha para strings longas dentro do <pre>:

pre {
   width:595px;
   white-space: pre-wrap;
   word-wrap: break-word;   
}
<pre>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</pre>

