CSS Flashcards
Name three different types of values you can use to specify colors in CSS.
rgb values, hex Codes, Color names
What is the default flex-direction of a flex container?
Items display in a row (the flex-direction property’s default is row ).
row (default): left to right in ltr; right to left in rtl
row-reverse: right to left in ltr; left to right in rtl
column: same as row but top to bottom
column-reverse: same as row-reverse but bottom to top
What is the default flex-wrap of a flex container?
nowrap
By default, flex items will all try to fit onto one line. You can change that and allow the items to wrap as needed with this property.
.container {
flex-wrap: nowrap | wrap | wrap-reverse;
}
What are the names of the individual pieces of a CSS rule?
A CSS rule: selector/selector group {declaration block with declaration/s - property/shorthand property (value value) and value,/with fallback value (font-family)
In CSS, how do you select elements by their class attribute?
. dot nation
In CSS, how do you select elements by their type?
With element Selector (id #, .classname)
What CSS properties make up the box model?
margins, borders, padding, and the actual content.
Which CSS property pushes boxes away from each other?
Margin
Which CSS property add space between a box’s content and its border?
Padding
How does setting position: relative on an element affect document flow?
This does not affect the position of surrounding elements; they stay in the position they would be in in normal flow.
How does setting position: absolute on an element affect document flow?
This positions the element in relation to its containing element. It is taken out of normal flow, meaning that it does not affect the position
of any surrounding elements
Positioning
Positioning allows you to take elements out of normal document flow and make them behave differently, for example, by sitting on top of one another or by always remaining in the same place inside the browser viewport.
What are the four components of “the Cascade”.
Source order.
Inheritance.
Specificity.
Importance.
List the three selector types in order of increasing specificity.
type selector, class selector and id
What does the transform property do?
The transform CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model.