CSS Flashcards
What are the names of the individual pieces of a CSS rule?
selector,
declaration,
BLOCK
property,
value
universal
css rule set
css selector
curly braze
In CSS, how do you select elements by their class attribute?
.class p class=””
In CSS, how do you select elements by their tag name?
p
In CSS, how do you select an element by its id attribute?
apple, div id=””
Name three different types of values you can use to specify colors in CSS.
HEX codes
RGB
Color Names
What CSS properties make up the box model?
margin, padding border, content area
Which CSS property pushes boxes away from each other?
Margin
Which CSS property add space between a box’s content and its border?
padding
box sizing border box
without border box, when you add padding etc to something, it may change the size of something
otherwise it gives you a tiny bit of padding within the content
What is a Pseudo Class?
A CSS pseudo-class is a keyword added to a selector that specifies a special state of the selected element(s)
-phantom class in a specific state they are rather than regular style selectors
What are CSS pseudo-classes useful for?
1 they help the navigator or show things that are being changed on the page
direct child selector
table > tr this means all table rows
What is the default flex-direction of a flex container?
row
What is the default flex-wrap of a flex container?
no-wrap
flex only controls the direct children, so you have to always add display flex