CSS Flashcards
What CSS property controls the font used for the text inside an element?
font-family
What is a pseudo-class?
keyword added to a selector that specifies a special state of the selected element
What are CSS pseudo-classes useful for?
apply a style to an element
What CSS properties make up the box model?
Content, padding, boarder, margin
Which CSS property pushes boxes away from each other?
margin
Which CSS property add space between a box’s content and its border?
padding
What are the names of the individual pieces of a CSS rule?
property : value;
In CSS, how do you select elements by their class attribute?
.className
In CSS, how do you select elements by their type?
the corresponding tag name
In CSS, how do you select an element by its id attribute?
idName
What is the default flex-direction of a flex container?
row
What is the default flex-wrap of a flex container?
wrap
Why do two div elements “vertically stack” on one another by default?
Because they are block elements (they start start on a new line)
What is the default flex-direction of an element with display: flex?
row
What is the default value for the position property of HTML elements?
static (normal flow)
How does setting position: relative on an element affect document flow?
if set alone (w/out a box offset) then it does not affect the flow
How does setting position: relative on an element affect where it appears on the page?
It does not have an affect on the page. It acts as if the block is still in it original location
How does setting position: absolute on an element affect document flow?
It acts as if that element is no longer there
How does setting position: absolute on an element affect where it appears on the page?
it acts as if it is on a separate top layer
How do you constrain an absolutely positioned element to a containing block?
Set its parent container to relative position
What are the four box offset properties?
top, bottom, left, right
What does the transform property do?
rotate, scale, skew, translate an element to modify its coordinate space of css
The transition property is shorthand for which four CSS properties?
transition- property, duration, timing-function, delay
Give two examples of media features that you can query in an @media rule.
max or min width
Which HTML meta tag is used in mobile-responsive web pages?