CSS Positioning Flashcards

1
Q

Any element that comes in as a block will automatically take up what size?

A

The full width of the page

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

What does inline-block value do?

A

Allows you to put several block elements on the same line.

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

What is the margin?

A

The space around the element

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

What happens when an element is set to position:absolute

A

It’s positioned in relation to the first parent element it has that DOESNT have position:static

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

What does the inline value do?

A

The inline value places all your elements next to one another, but not as blocks: they don’t keep their dimensions.

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

What is the border?

A

The edge of the element

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

What happens if there’s no such element with position:absolute

A

It’s positioned relative to

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

What is the inline display value best suited for?

A

HTML elements that are blocks by default, such as headers and paragraphs.

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

What is the padding?

A

The spacing between the border and the innermost layer: the actual conent

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

What does relative positioning do?

A

It tells the element to move relative to where it would have landed if it just had the default static positioning

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

What does the none display value do?

A

this prevents the page from displaying the selected element. As you might not expect, this removes the selected element from the page entirely, including any children and any content.

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

What is the content

A

The stuff in the box

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

What does fixed positioning do?

A

“glues an element to the screen”

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

Test Question

A

Test Answer

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

How do you set an element’s margin all at once

A

Start from the top margin and go around clockwise (going from top to right to bottom to left).

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

What does the clear property do?

A

Specifies which sides of an element where other floating elements are not allowed

7
Q

What happens when you tell an element to clear left?

A

it will immediately move below any floating elements on the left side of the page; it can also clear elements on the right. If you tell it to clear: both, it will get out of the way of elements floating on the left and right!

7
Q

What does the float property do?

A

The float property specifies whether or not a box (an element) should float.

8
Q

What happens when you don’t specify an element’s positioning type

A

It defaults to static

8
Q

What is the z-index property?

A

The z-index property specifies the stack order of an element