Prelims - Height, Width and Max-width Flashcards

1
Q

property is used to set the maximum width of an element.

A

max-width

div {
  max-width: 500px;
  height: 100px;
  background-color: powderblue;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

properties are used to set the height and width of an element.

A

height and width

The height and width properties do not include padding, borders, or margins. It sets the height/width of the area inside the padding, border, and margin of the element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The height and width properties may have the following values:

A

auto - This is default. The browser calculates the height and width
length - Defines the height/width in px, cm, etc.
% - Defines the height/width in percent of the containing block
initial - Sets the height/width to its default value
inherit - The height/width will be inherited from its parent value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Sets the minimum width of an element

A

min-width

How well did you know this?
1
Not at all
2
3
4
5
Perfectly