CSS Vertical align/ text-align, combinators Flashcards

1
Q

What is the difference text-align and vertical-align?

A

Text-align decides the position in the DIV. e.g text-align: center;

Vertical-align decides on the position within the line it’s in in inline-block;

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

What does margin: auto; do?

A

Here’s what margin: auto; does:

Horizontal centering: It sets the left and right margins of the element to automatically adjust to evenly distribute the available space. This effectively centers the element horizontally within its container.

Equal margins: It ensures that the left and right margins are equal. This creates a symmetrical spacing around the element.

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

How to make a square with border-radius?

A

50%

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

What are the ‘arguments’ for border to make colour, solid width etc shorthand?

A

.element {
border: 2px solid red;
}

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

What does this mean? margin: 0 16px;

A

margin-top: 0;
margin-right: 16px;
margin-bottom: 0;
margin-left: 16px;

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