CSS UNIT 2.1 Media Queries Flashcards

1
Q

Define CSS Box Model

A

The CSS box model is essentially a box that wraps around every HTML element. It consist of: margins, borders, padding, and the actual content.

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

Using padding or border shorthand property what four values are accepted?

A

top right bottom left

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

Define the “box-sizing” property

A

the box-sizing property tells the browser to account for any border and padding values you specify for an elements width and height.

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

Define “max-width” property

A

the max-width property sets the maximum width of an element. It prevents the used value of the width property from becoming larger than the value specified by max-width

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

Define “viewport-relative” units

A

“Viewport” are relative unites that act based of percentage of the current browsers viewport

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

Define “display” property

A

The display CSS property sets whether an element is treated as a block or inline element and the layout used for its children, such as flow layout, grid or flex.

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

Define “inline”

A

Inline elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of the content. Any height and width properties will have no effect.

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

Define “inline-block”

A

Displays an element as an inline-level block container. You CAN set height and width values.

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

Define the “position” property

A

The position CSS property sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final location of positioned elements.

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

How does “position: static” effect an element?

A

The element will flow on the page as normal. The only reason you would ever set an element to position: static; is to forcefully remove some positioning that got applied to an element outside of your control.

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

How does “position: relative” effect an element?

A

If you set position: relative; on an element but no other positioning attributes (top, left, bottom or right), it will have no effect on it’s positioning at all, it will be exactly as it would be if you left it as position: static

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

How does “position: absolute” effect an element?

A

You use the positioning attributes top, left, bottom, and right to set the location. Remember that these values will be relative to the next parent element with relative (or absolute) positioning.

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

How does “position: fixed” effect an element?

A

A fixed position element is positioned relative to the viewport, or the browser window itself. The viewport doesn’t change when the window is scrolled, so a fixed positioned element will stay right where it is when the page is scrolled.

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

How does “position: sticky” effect an element?

A

A sticky element will just sit there like a static element, but as you scroll past it, if it’s parent element has room (usually: extra height) the sticky element will behave as if it’s fixed until that parent element is out of room.

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

Define “float” element

A

The float property places an element to the left or right side of it’s container. This allows any text or other elements o wrap around it.

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

What is a “media query”

A

Media queries are useful when you want a browser to be responsive (modified) based off a devices characteristics and parameters (such as the resolution to fit screen)