Quick HTML

Width and height

The body, the <P> and <DIV> sections, the tables and their <TD> cells, can have a fixed width and height.

Size setting

Width and height can be expressed in pixel or percentage of the available space,
even together in the same instruction. For example:
DIV.small { width: 25%; }

DIV.medium { width: 50%; }

DIV.max { width: 75%; height: 100px; }

<DIV class="small">This section is 25% wide.</DIV>
This section is 25% wide.

<DIV class="medium">This section is 50% wide.</DIV>
This section is 50% wide.

<DIV class="max">This section is 75% wide and 100 pixel high.</DIV>
This section is 75% wide and 100 pixel high.

Next page :

an introduction to colours.

|   Back   |   Index   |   Next   |