|
|||
Tabelle height 100% im IE
Hallo Leute.
Ich habe folgendes Problem. Ich befinde mich im IE6 im Standard Mode. Ich habe eine Tabelle innerhalb eines DIV. Die Tabelle hat height:100%. Wird nun das Div per JS in der Höhe verändert, so passt sich die Tabelle in ihrer Höhe nicht an. Weder beim verkleinern noch beim vergrößern, obwohl die Höhe relativ angegeben wurde. Macht man nun einen Resize vom Browser-Fenster in der Breite. So passt die Tabelle wieder. Ein Resize nur in der Höhe hat keine Auswirkung. Statt der Tabelle in dem Div kann man auch ein Div verwenden. Dieses ändert seine Höhe auch nicht. Die selbe Seite funktioniert im IE7, FF2 und im IE6 im Quirksmode. Wie schaffe ich es, das die Tabelle sich in der Höhe anpasst. Danke im Voraus! Paul Quelltext: Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" style="width:100%;margin:0;" > <head> <style type="text/css"> .div { height:400px; } .table { height:100%; } </style> </head> <body style="width:100%;height:100%;margin:0;position relative;"> <input type="button" value="big" onclick="document.getElementById('my').style.height='500px';"> <input type="button" value="normal" onclick="document.getElementById('my').style.height='400px'"> <input type="button" value="small" onclick="document.getElementById('my').style.height='300px'"> <div class="div" id="my" style="width:100%; border:2px solid red"> <table id="tab" class="table" style="width:100%;" cellpadding="0" cellspacing="0" border="1"> <tr> <td valign="top"> cell 1 </td> </tr> <tr> <td style="width:100%;">cell2</td> </tr> </table> </div> </body> </html> |
Sponsored Links |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Brauche Hilfe: Schwarzes Nichts | Zwox | CSS | 10 | 19.11.2010 17:53 |
Darstellungsprobleme im IE | lea11011989 | CSS | 17 | 05.11.2010 10:44 |
Div Positionen in Firefox falsch | ozero | CSS | 4 | 17.07.2009 23:35 |
prblemme mit mein inhalt div | carlos587261 | CSS | 3 | 23.04.2008 15:07 |
Mozilla zeigt DIV zu oft an | cracki | CSS | 6 | 09.03.2008 16:22 |