CSS Properties Flashcards

1
Q

Color

A

Color

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

Size of font

A

font-size

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

Sans serif

A

font-family: sans-serif

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

Uppercase

A

text-transform: uppercase

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

Font style

A

font-style: italic

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

Line height
Where to set this property?

A

line-height: 1.5

Good thing to set this in the body tag! (Just as for example sans-serif property)
All the lines for all the text will now adjust to what you set here

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

Text align

A

text-align: center

Puts the text in the middle of the element block

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

Set under line text

A

text-decoration: underline dotted orangered

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

Sets list style back to default

A

list-style: none;

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

Background color

A

background-color: #00ffff

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

Hexadecimal value

A

00ffff

Each pair of 2 characters refers to a hexadecimal value in RGB

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

Set border

A

border-top: 5px solid #1098ad;

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

Border 3 elements?

A

Border always has 3 values: Line size, fill and color

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

Padding elements?

A

padding: 20px 40px;

First value refers to top-bottom, second value refers to left-right

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

Create extra white space at the bottom outside of the element

A

margin-bottom:10px;

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

What happens when margins overlap?

A

When margins overlap, it will not add them up but rather takes the largest

17
Q

How to use margin to set content to center of page?

A

.container{
width: 700px;
margin-left: auto;
margin-right: auto;
}

When setting the margin left and right BOTH to auto, the left and right side will both be the same, which results in the centering of the page

18
Q

What does this do?

width: 100%

A

Width will be taken from parent

19
Q

How to position something to top left of viewport?

A

position: absolute;
top: 0;
left: 0;

20
Q

Position something relative to another element, for example the body

A

body{
position: relative;
}

button{
position: absolute;
}

The button will be placed relative to the body

21
Q

When relatively position an element, which element will it be relative to?

A

It looks at the first relative parent element

22
Q

Set top down margin zero and left right to auto

A

margin: 0 auto;

23
Q

Square bullets

A

list-style: square

24
Q

Show cursor on button

A

cursor: pointer;

25
Q

Set 50px margin on top and same width left and right

A

margin: 50px auto;

26
Q

Would this work?

.more-info:link, .more-info:visited {
margin-bottom:30px;
color: black;
}

A

No, margin does not work on small elements such as anchor

27
Q

How to space out area between list elements?

A

Use a descended selector.
The class refers to the list and the element to the list elements, like this:

.details-list li{
margin-bottom: 10px;
}

28
Q

Stretch out button all over the length of the container

A

width:100%