css essential 2 Flashcards
True or false. inline-block can use to setup navigation links.
TRUE
The inline-block is always a problem–Dealing ____ of inline-block elements
WHITESPACES
How could you solve whitespace-problem of an inline-block? Solution 1 https://i.imgur.com/Y2z3Gue.png
No Space between elements. it may be a problem for readability of HTML codes.
What trick font-size property does?
https://i.imgur.com/TwqlYDR.png
font-size:0 on the parent element of inline-element and then reset on inline element removes spaces between inline-element.
Why there is an unnecessary HTML comment on every inline-block? https://i.imgur.com/D6JvrqG.png
HTML comments on every inline-block element and Droping the closing bracket to the newline removes
extra spaces between inline-block elements
Negative margin? why https://i.imgur.com/q7K745y.png
Negative margin removes extra spaces between inlin-block elements
Dropping the closing angle? what the fuck is that?
https://i.imgur.com/OBiukoS.png
Yeah this is another trick to remove extra spaces between inline-block elements . Simply use nav tag
______ allows you to specify the position of an element. e.g. left, right.
Float property
What clear property does https://i.imgur.com/ipqiUYw.png
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>
Floated element problem:
https://i.imgur.com/T3XcSyt.png
contained element when floated overlaps to the container element
What would be happened when you apply float property to the anchor tag
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
What are the alternative solutions for creating navigation instead of an anchor tag
nav element and flexbox
____ property is used to arrange elements relative to the default flow or browser viewport
Position
The element is positioned according to normal position
position:Relative
positioned relative to the browser window
positon:fixed