CSS Flashcards

1
Q

how to enable flexbox

A

display: flex;

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

how to justify flexbox

A

justify-content:

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

what are the options to justify content in flexbox

A
centre
flex-start
flex-end
space-around
apace-between
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

how to vertically align items in flexbox

A

align-items:

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

what are the vertical alignment options in flexbox

A
centre
flex-start
flex-end
baseline
stretch
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

how to specify the direction

A

flex-direction: row, column

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

default direction of flexbox

A

row (side by side)

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

flex shortcut

A

flex: 0 0 10px (grow shrink basis)

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

use a media query

A
@media (max-height: 800px){ 
    p {
    font-size: 10px;
      }
  }
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what does align-self do?

A

Center the alignments for one of the items inside a flexible element

allows to switch up elements alignment individually

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

The align-self property ____ the flexible container’s align-items property.

A

overrides

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

How to make images responsive? (Example code)

A
img {
max-width: 100%;
display: block;
height: auto;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what are viewport units relative to?

A

device

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

what are % units relative to?

A

size of the container

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

The grid-column is a shorthand property for

A

grid-column-start and grid-column-end.

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

grid-column specifies

A

grid item’s size and location within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement

17
Q

default flex justification

A

flex-start

18
Q

justify-content aligns down the ___ axis

A

vertical

19
Q

align-items aligns down the ___ axis

A

horizontal

20
Q

flex: grow shrink basis - what do they mean?

A

flex-basis: sets the size
flex-shrink: sets the shrink factor of elements
flex-grow: sets the grow factor of elements

21
Q

what is the css equivalent of <strong></strong>

A

font-weight: bold;

22
Q

How to create overlapping elements with CSS (code)

A

first {
position: absolute;
}

second {

position: absolute;
top: 90px;}

23
Q

center block with

A

margin: auto;

24
Q

box-shadow settings

A
offset-x
offset-y
blur-radius
spread-radius
color
25
Q

rgba():

A

same as rgb() + a for opacity (0,1)

26
Q

how to make the text strikethrough with css ()

A

text-decoration: line-through;

27
Q

how to italicise text in css (<em>)</em>

A

font-style: italic;

28
Q

how to underline text with css (<u>)</u>

A

text-decoration: underline;

29
Q

enable css grid

A

display: grid
grid-template-columns:
grid-template-rows:

30
Q

set gap between grid

A

grid-gap: 10px
//both
grid-gap: 10px 5px
// row col

31
Q

grid-column or grid-row usage

A

grid-column: 1/3
//start on column 1 and span 3 columns
grid-row: 1/3
//start on row 1 and span 3 rows

32
Q

alignment methods in grid

A

justify-self: stretch/center/end
align-self: “-“
justify-items: //does both

33
Q

methods available in grid-column

A

repeat (x, [sizing])
minmax(min,max)
auto-fill
auto-fit

34
Q

grid-template-areas syntax

A

grid-template-areas:
“header header header”
“content content content”
“footer footer footer”

then…

item {
grid-area: header}