Hello and nice to meet you.
I have the following problem.
Please take a look at http://paste2.org/p/1911703(I have attached the code below).
In firefox the whole page fits in the viewport(no scrollbars appear) but in ie9 it doesn’t.
Each td has height 100%(the whole page).
The code is generated from a control so it’s a little bit difficult for me to change it.
Any ideas please? Thanks.
IE8 and under will still get it wrong though as they will add the 2 cells up and make 2 * 100% equal 200% (as you might expect). You probably should only apply the 100% to the last td anyway otherwise IE9 will try and equally divide it between the 2 cells that have the height specified.
No, I said it wouldn’t work in IE8. If you remove the height:100% from the td then it will work and the table will be 100% high (apart from the borders you added which make it bigger). Once you add 100% to one of the tds then the table height in IE8 becomes 100% + the height of the other 2 tds. IE8 doesn’t understand that when you over constrain the height of the table-cells that it should re-distribute within the original table height. Instead it just expands the table to fit the content. Can you get away with just one cell?
Maybe there’s some other way of doing what you want without a table but it sounds like you are stuck to what you have already.