Height = 100% doesn't seem to work for the table

I am trying to use a table at 100% height.

This scenario shows the problem. 100% of width is used (try changing the width to see this). However, the images remain cluttered at the top of the window, even if the window is made very tall.

0
source share
3 answers

Try the following:

html, body 
{
  margin:0;
  padding:0;
  height:100%;
  border:none
}
+2
source

You might think that height: 100% means that it will use all the free space, however in reality it just means that the element has the same height as the container. Subsequently, a parent element without a fixed height has the same height as the content.

, DOM. DOM , , . , , 600 . , , DOM ( ) 600 .

100%. .

+2

I noticed that the HEIGHT = "100%" attribute does not work when this ad is inserted:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

but it works as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Hope this helps

+2
source

All Articles