Hallo, ist height:100% für Block-Elemente nicht erlaubt?
Wenn ich den folgenden Layer mit height:100% festlege ist es kein Problem:
<div style="width:120px;height:100%;background-color:#ff0000;">
test
</div>
Füge ich jedoch im <DOCTYPE>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
oder
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
ein, so wird die Höhe nur noch vom Inhalt bestimmt.
Nun heißt es doch
"Specifies a percentage height. The percentage is calculated with respect to the height of the generated box's containing block. If the height of the containing block is not specified explicitly (i.e., it depends on content height), the value is interpreted like 'auto'."
Aber <body> hat doch auch eine Höhe von 100%. Also müsste es doch funktionieren, oder?
Weiß jemand Rat?
Michi