Date cuenta que no funciona si cambias el texto:
Código PHP:
<body> <div style="border: 5px solid green; margin: auto; width: 30%;"> <div style="float: left; width: 50%;"> <table border="1" width="100%" style="background:#aabbcc;"> <tr> <td>11111111111111<br /> 11111111111111<br /> 11111111111111<br /> 11111111111111<br /> 11111111111111<br /> 111111111111111111111111111111111111111111<br /> </td> </tr> </table> </div> <div style="float: left; width: 50%;"> <table border="1" width="100%" style="background:pink;"> <tr> <td>222222222222<br /> 222222222222<br /> 222222222222<br /> 222222222222<br /> </td> </tr> </table> </div> <div style="clear: both;"></div> </div> </body>
Es claro que el texto va a cambiar por eso no debe estar AMARRADO el width