Setting a Height or Width of an Element

It is possible to set the height and width for most of the elements on a webpage including images, form elements and even blocks of text.

To set the height or width of an element:
a: Type width: w
Here, w represents the width of the elements content area and this may be expressed either as a length (with units) or indeed as a percentage of the parent element.  You can also use auto to let the browser calculate the width.

b: Type height: h
Here, h represents the height of the element and this may only be expressed as a length (with units).  You can also use auto to let the browser calculate the height.

It is worth remembering that a percentage value is relative to the width of the parent rather than the original width of the element itself.  Also, generally speaking, the padding, borders and margin are not included in the value of width.  Finally, don't forget that if you don't set the width or height of an element then auto is automatically used.