As annoying the use of tables for layout is, they are still the best way to process vertical dimensions sequentially. The following still displays a few white pixels around the edge of the iframe and has an extra scrollbar in some versions of Firefox, but as close as I was able to achieve:
<!DOCTYPE html> <html style="padding:0; margin:0; height:100%"> <body style="padding:0; margin:0; height:100%"> <table style="border:0; padding:0; margin:0; height:100%; width:100%"> <tr style="border:0; padding:0; margin:0"> <td style="border:0; padding:0; margin:0"> <p style="margin:10px"> hello </p> </td> </tr> <tr style="border:0; padding:0; margin:0"> <td style="border:0; padding:0; margin:0; height:100%"> <iframe src="http://www.weather.com" style="border:0; padding:0; margin:0; width:100%; height:100%"></iframe> </td> </tr> </table> </body> </html>
If you really want to avoid table elements, you can get some traction from div tags with display:table , display:table-row and display:table-cell , but be prepared for even more annoying quirks in some browsers.
eswald
source share