css essential 2 Flashcards

1
Q

True or false. inline-block can use to setup navigation links.

A

TRUE

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

The inline-block is always a problem–Dealing ____ of inline-block elements

A

WHITESPACES

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

How could you solve whitespace-problem of an inline-block? Solution 1 https://i.imgur.com/Y2z3Gue.png

A

No Space between elements. it may be a problem for readability of HTML codes.

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

What trick font-size property does?

https://i.imgur.com/TwqlYDR.png

A

font-size:0 on the parent element of inline-element and then reset on inline element removes spaces between inline-element.

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

Why there is an unnecessary HTML comment on every inline-block? https://i.imgur.com/D6JvrqG.png

A

HTML comments on every inline-block element and Droping the closing bracket to the newline removes
extra spaces between inline-block elements

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

Negative margin? why https://i.imgur.com/q7K745y.png

A

Negative margin removes extra spaces between inlin-block elements

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

Dropping the closing angle? what the fuck is that?

https://i.imgur.com/OBiukoS.png

A

Yeah this is another trick to remove extra spaces between inline-block elements . Simply use nav tag

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

______ allows you to specify the position of an element. e.g. left, right.

A

Float property

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

What clear property does https://i.imgur.com/ipqiUYw.png

A

If the element can be fit horizontally in the space next to the floated element, It will fit itself. <b>Unless you apply the clear property in the same direction of the float property</b>

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

Floated element problem:

https://i.imgur.com/T3XcSyt.png

A

contained element when floated overlaps to the container element

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

What would be happened when you apply float property to the anchor tag

A

No space between the floated anchor tags and the height of a floated elements are zero, so if there is a background color on a parent element, background color does not show. it also makes a block element

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

What are the alternative solutions for creating navigation instead of an anchor tag

A

nav element and flexbox

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

____ property is used to arrange elements relative to the default flow or browser viewport

A

Position

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

The element is positioned according to normal position

A

position:Relative

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

positioned relative to the browser window

A

positon:fixed

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

Positioned to its first positioned ancestor element(not static). remove to the natural flow of the page

A

positon:absolute

17
Q

positioned to the user’s scroll position

A

position:sticky

18
Q

Pre-written stylesheet containing rules that override all default browser style to an un-styled baseline. normalize another fix

A

Reset stylesheet

19
Q

Prewritten stylesheet containing rules that aim to create consistent default styles, rather than removing them. https://medium.com/@elad/normalize-css-or-css-reset-9d75175c5d1e

20
Q

Applies different CSS properties according to different screen sizes

A

Media Query

21
Q

a CSS background property that fixes a background to the viewport

A

background-attachment:fixed|scroll;

22
Q

allows you to move background image around within its container( select which part to show)

A

background-positon:

23
Q

the size of an image background

A

background-size: length(width and height)| cover| contain|

24
Q

a background-size property value that covers the entire container

25
a background-size property value that resizes the background image to make sure the image is fully visible (not so stretch)
contain
26
mnemonic for background property
I. P. man Resends An Original CLear Copy
27
What are media types
print speech screen all
28
this is a media type that matches the printer
print
29
this is a media type that matches screen reader
speech
30
this is a media type that matches all devices that are not print or speech
screen
31
this is a media type that matches to all devices
all
32
what are CSS property that is used with media query types
min-width and max-width, and width
33
is a CSS rule that selects all input element that has type=search
[type='search']{ }
34
what are the sibling combinators
adjacent(+) which selects the next element | general(~) which select all next elements
35
https://i.imgur.com/vJ4I9C5.png | How could you select the element next to h2 element
``` h2+p{ /*selects paragraph 2 */ } ```
36
https://i.imgur.com/vJ4I9C5.png | HOw could you select paragraph 2~4 next to h2 element
``` h2~p{ /*selects paragraph 2~4*/ } ```
37
is a keyword added to a selector with `:` for a specific state. For example, hover and visited of an anchor tag
Pseudo-class selector
38
select every first child of a parent elements | https://i.imgur.com/57uwQDL.png
p:first-child{ color:red; }
39
select every last child of a parent elements | https://i.imgur.com/57uwQDL.png
p:last-child{ color:red; }