CSS Flashcards
how do you select elements by their class attribute?
write a period (.) character, followed by the name of the class
In CSS, how do you select elements by their tag name?
write a hashtag(#) character, followed by the id of the element.
how do you select an element by its id attribute?
write a hash (#) character, followed by the id of the element.
Name three different types of values you can use to specify colors in CSS.
RGB, HEX, HSL, RGBA, HSLA values.
What CSS properties make up the box model?
margins, borders, padding, and the actual content.
Which CSS property pushes boxes away from each other?
Margins
Which CSS property add space between a box content and its border?
padding
What is the default value for the position property of HTML elements?
The default value of the position property is static .
How does setting position: relative on an element affect document flow?
relative positioning doesn’t affect the layout,
How does setting position: relative on an element affect where it appears on the page?
it will have no effect on it’s positioning at all,
How does setting position: absolute on an element affect document flow?
Absolutely positioned elements are removed entirely from the document flow.
How does setting position: absolute on an element affect where it appears on the page?
The element is removed from the normal document flow, and no space is created for the element in the page layout. It is positioned relative to its closest positioned ancestor,
What are the four box offset properties?
op, left, bottom and right.