LearningFuze Mod 1 - CSS Flashcards
This is CSS
What are the names of the individual pieces of a CSS rule?
selector and deceleration
In CSS, how do you select elements by their class attribute?
. then class selector
In CSS, how do you select elements by their type?
add the name of the tag
In CSS, how do you select an element by its id attribute?
then the selector
Name three different types of values you can use to specify colors in CSS.
rgb values, hex codes and color names
What CSS properties make up the box model?
Border, margin and padding
Which CSS property pushes boxes away from each other?
The margin property
Which CSS property add space between a box’s content and its border?
The padding property
What is a pseudo-class?
It changes the appearance of elements when a user interacts with them
What are CSS pseudo-classes useful for?
Creates an interactive webpage
Name two types of units that can be used to adjust font-size in CSS.
Pixels and rem
What CSS property controls the font used for the text inside an element?
Font-family
What is the default flex-direction of a flex container?
Row
What is the default flex-wrap of a flex container?
nowrap, all items will try to fit on one line
Why do two div elements “vertically stack” on one another by default?
Because they are block elements
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
How does setting position: relative on an element affect document flow?
It moves the item it was applied to, but doesn’t affect the rest of the document flow.
How does setting position: relative on an element affect where it appears on the page?
It makes the element get positioned relative to where it would be in the normal document flow.
How does setting position: absolute on an element affect document flow?
Surrounding elements ignore the space the absolute positioned element would have taken up. The absolute item no longer has a place in the document flow.
How does setting position: absolute on an element affect where it appears on the page?
The element is placed relative to where it is in its containing element, so make sure the containing element is set to relative also. It will go back to the first HTML element that is not static.
How do you constrain an absolutely positioned element to a containing block?
You must apply a non-static position
What are the four box offset properties?
top, right, bottom, and left
What are the four components of “the Cascade”.
Source order, inheritance, specify and importance
What does the term “source order” mean with respect to CSS?
** Need to fill in **
List the three selector types in order of increasing specificity.
Type, Class and ID
Why is using !important considered bad practice?
Making debugging more difficult
What does the transform property do?
It modifies the coordinate space of the CSS visual formatting model.
Give four examples of CSS transform functions.
rotate, scale, skew, or translate
The transition property is shorthand for which four CSS properties?
transition-property, transition-duration, transition-timing-function, and transition-delay
What is a breakpoint in responsive Web design?
Points at which a media query is introduced
What is the advantage of using a percentage (e.g. 50%) width instead of a fixed (e.g. px) width for a “column” class in a responsive layout?
there will be fewer width properties, px measurement needs to be exact for different devices
If you introduce CSS rules for a smaller min-width after the styles for a larger min-width in your style sheet, the CSS rules for the smaller min-width will “win”. Why is that?
because of the cascade facet, source order
Give two examples of media features that you can query in an @media rule.
color and device-height
Which HTML meta tag is used in mobile-responsive web pages?
view port meta tag