Module 04-02 CSS Selectors & The Box Model Flashcards
What kind of elements take up the entire width of a line?
block elements
What kind of elements appear one beside another?
inline elements
What kind of elements appear one beside another but can have their height and width set?
inline-block elements
What is the space inside an element, between its content and border?
Padding
What is the edge of an element?
Border
What is the space outside of an element, between the element and other elements?
Margin
How is an elements space calculated?
Adding content + padding + border + margin
How do you denote a class selector?
period before the class name (i.e. .notice { } )
How do you denote an ID selector?
hashtag before the ID name (i.e. #info { } )
What is the universal selector that denotes defaults for a page?
- { }
How do you denote an attribute selector?
attribute in brackets after type (i.e. input[type] or input[type=text])
How do you denote a pseudo-class selector?
color after the type (i.e. a:hover or input:enabled, etc.)
How is a Combo Combinator used?
Selectors are strung together (i.e. button[type=submit).danger for buttons of type submit that have a class of danger)
How is a Multiple Combinator used?
Multiple elements separated by commas (i.e. button, input[type-checkbox], select)
How is a Descendant Combinator used?
Element inside another separated by space (i.e. div.aside p for any p within a div with class aside)