Home HTML CSS JAVASCRIPT BOOTSTRAP Python Docker ML tutorial About us Privacy policy

height and width in css


CSS Height and Width:-



Code Family

Setting height and width in css

The height and width properties are using to set the height and width of the element.

height and width Values in css-:

  • auto - This is default. The browser calculates the height and width of the elements and display
  • length - the height and width in px, cm etc.
  • % - the height and width in percent of the element
  • initial - Sets the height and width to it is default value
  • inherit - The height and width will be inherited from its parent value and default value
  • Setting max-width in css:-

    The max-width property is using to set the maximum width of an element.