Chapter 5 Flashcards
What is the box model?
It uses the CSS properties margin, border, and padding to arrange content on the page.
What is the differences between margins and border?
Margins = transparent, meaning we cannot add color or style to the margin property.
We can add color and style to the border.
What is the flexible box layout?
It is new in CSS3
Creates flexible elements in order to accommodate different screen sizes and display devices.
Uses parent-child concept.
What is the first step in creating a flexible layout?
- Create a flexible parent element.
2. All the child elements contained inside the parent element are flexible by default.
What is the display property value to flex?
display:flex;
What is the term for child elements inside a parent flex element?
Child flex items
What does the flex properties tell the browser?
The flex-grow, flex-shrink, and flex-basis properties tell the browser or user agent how elements should react when the display or screen size changes.
What is flex-grow?
The flex-grow property specifies how much the element will grow relative to the other flex items within the parent flex container. The amount of actual growth is determined by the available space in the parent element. Negative numbers cannot be used as a flex-grow value. The default flex-grow value is one, meaning each flex item is the same size.
If the value is set to zero = it will not grow.
What is flex-shrink?
The flex-shrink property specifies how much the element will shrink relative to the other flex items within the parent flex container. The default flex-shrink value is one.
If the value is set to zero= it will not shrink.
What is flex-basis?
The flex-basis property, the third value provided to the flex property, sets the initial width of the element before the other elements are distributed. If the flex-basis value is not set, it defaults to 0.
What is a flex-direction?
The flex-direction property is a parent flex box property that is used to change how the flex box container will display child items
What is flex-wrap:wrap used for?
Allows the contents to be displayed vertically whn the screen gets smalller.
Whats another way of writing:
#container { display:flex; flex-direction: row; flex-wrap: wrap; }
container {
display:flex;
flex-flow: row wrap;
}
What is a grid layout model?
It is still under development
Only IE 10 browser supports it and no other browsers.
W3C considers it as “Working draft”
Grid items?
Grid tracks?
Grid cell?
Grid lines?
Child elements are called grid items
grid tracks are the rows and columns in the grid.
grid lines are the horizontal and vertical lines between the
grid cell is the space used for the layout of the element like cells in an Excel spreadsheet.columns and rows,