Axel Richter: tabellen höhe auf 100% setzen

Beitrag lesen

Hallo,

Laut W3-Standard sind Höhen- und Weitenangaben im <table> nicht erlaubt, nur im <td>.

Nö.

http://www.w3.org/TR/html4/struct/tables.html#h-11.2.1

<!ELEMENT TABLE - -
     (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
<!ATTLIST TABLE                        -- table element --
  %attrs;                              -- %coreattrs, %i18n, %events --
  summary     %Text;         #IMPLIED  -- purpose/structure for speech output--
  width       %Length;       #IMPLIED  -- table width --
  border      %Pixels;       #IMPLIED  -- controls frame width around table --
  frame       %TFrame;       #IMPLIED  -- which parts of frame to render --
  rules       %TRules;       #IMPLIED  -- rulings between rows and cols --
  cellspacing %Length;       #IMPLIED  -- spacing between cells --
  cellpadding %Length;       #IMPLIED  -- spacing within cells --
  >

Wie Du siehst, ist <table width="100%"> valides HTML4.01.
Eines der %coreattrs ist style. Das heißt <table style="height:100%;"> ist valides HTML4.01.

Gruß

Axel