Troubleshooting, Centering, Positioning Flashcards

1
Q

List two ways you can troubleshoot inline elements that run together.

A
  1. You use the line-height property of the inline container of the inline element and give it a value.
  2. You change the display from inline to inline-block or block and give it a margin top property value.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you center inline elements horizontally?

A

You give the parent block element that contains the inline element a text-align property value of center.

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

How do you center inline elements vertically?

A

You use the vertical align property on the inline element.

Note that this may or may not work.

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

How do you center a block element horizontally?

A

You may give the block element a width and set the left and right margins to auto or set the margins to auto.

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

How do you center block elements vertically?

A

There is no straight forward way to center block elements vertically.
The best way is to use flexbox.

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

Define a positioned element.

A

A positioned element is one that has had its position property changed from its default values.

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

Define the CSS position property.

A

The CSS position property governs how elements in a page are positioned and how they respond to the position adjusting values of top, right, bottom, and left.

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

List all the CSS position property values.

A
  1. Static (The default)
  2. Fixed
  3. Relative
  4. Absolute
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Flexbox reduces the use case of what CSS position property values?

A

Relative and absolute

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

List all the characteristics you know of the CSS position value of static ( static elements).

A
  1. It is the default for all elements.
  2. Static elements follow the “flowing text” model of layout.
  3. Static elements completely ignore the positioning adjusting properties of top, right, bottom and left.
  4. The properties that influence static elements are:

a) margins
b) paddings
c) floats
d) The display property values of block, inline, inline-block, etc

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