PHP中的HTML <pre>自动换行不起作用

I've been working on a forum, and I've made everything work as it, and I tried wrapping to see if it works, basically that part of the code looks like this before the PHP I got some HTML style:

<style>
    pre {
        white-space: pre-wrap; 
        white-space: -moz-pre-wrap;
        white-space: -pre-wrap;
        white-space: -o-pre-wrap;
        word-wrap: break-word;    
        font-size: 20px;
        margin: 0% 8% 0px 8%; 
    }
</style>

And then after a bunch of MySQL things

echo '<table style="height: 21px;" width="100%">';
while($forumcomrow=mysqli_fetch_array($forumcomres))
{
    echo '<tr><td>some text</td><td><pre>Some Very Long Text From Mysql </pre></td></tr></br>';
}
echo '</table>';

I removed everything and just left the style for it and the echo for the table, when I echo just the pre tag, it wraps it at the end of the screen, but as soon as I put it in a table (size doesn't matter, even if I put the width of the table to 5px) it still goes 10 miles off the screen until it starts wrapping.

This is what happens:

This is what happens

On the picture above you can see one part of it, but the text goes off screen about 5x the length you can see on there, and only then starts wrapping

I have figured out what's giving it a problem, it will wrap the text if it has spaces ("aaaa aaa aaa aa aa") but if its one long word ("aaaaaaaaa") it won't wrap it, I don't know how to fix it, I've just figured out whats causing the problem.

It is because of <br> tag at the end, I have faced the same problem some time ago. <br> get applied first for every time and then table gets wrapped.

Remove <br> at the end

echo '<tr><td>some text</td><td><pre>Some Very Long Text From Mysql </pre></td></tr>';

and then it will work perfectly fine.