The Box Model Flashcards

1
Q

Which properties can be used to manipulate the dimensions of an HTML box?

A

height and width

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

What are the keywords you can use to set the thickness of a border?

A

thin, medium, and thick

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

Which property affects the corners of the border?

A

border-radius

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

How to create a perfectly circular border?

A

border-radius: 100%

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

padding

A

The space between the contents of a box and the borders of a box

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

margin

A

The space directly outside of the box

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

In order to center something, what attribute must be specified?

A

width

Otherwise it will default to the width of the containing element and there will be no effect.

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

Quick easy horizontal centering using margin (if it has width specified)

A

margin: 0 auto

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

What does it mean that vertical margins collapse?

A

Unlike horizontal margins, vertical margins do not add. Instead, the larger of the two vertical margins sets the distance between adjacent elements.

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

min-width

max-width

min-height

max-height

A

this property ensures a minimum width of an element’s box.

this property ensures a maximum width of an element’s box.

this property ensures a minimum height of an element’s box.

this property ensures a maximum height of an element’s box.

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

overflow property

A

Controls what happens to content that spills, or overflows, outside its box. It can be set to one of the following values:

hidden - when set to this value, any content that overflows will be hidden from view.

scroll - when set to this value, a scrollbar will be added to the element’s box so that the rest of the content can be viewed by scrolling.

visible - when set to this value, the overflow content will be displayed outside of the containing element. Note, this is the default value.

The overflow property is set on a parent element to instruct a web browser how to render child elements. For example, if a div’s overflow property is set to scroll, all children of this div will display overflowing content with a scroll bar.

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

visibility property

A

The visibility property can be set to one of the following values:

hidden — hides an element.
visible — displays an element.

Note: An element with display: none will be completely removed from the web page. An element with visibility: hidden, however, will not be visible on the web page, but the space reserved for it will.

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

box-sizing: border-box;

A

Changes the box model to border-box

In this box model, the height and width of the box will remain fixed. The border thickness and padding will be included inside of the box, which means the overall dimensions of the box do not change.

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