1. spaces between inline-block and inline element
a. you can use zero font-size to eliminate the white space. Then reset back the font-size in the inner element to 1 rem.
b. comments out the white space between the inline-block element.
2. methods to clear float.
Method One
.group:after {
display: block
content: ""
clear: both
}
Method Two
add a empty div element after the floated element, then add a "clear: both" property.
Method Three
Use "overflow: hidden" within the parent container element. This creates a block formatting context that will cause the parent to expand to contain the width and height of the floated child element.
3. static, relative, absolute, fixed positioning
Static element is the default position. All element are in the document flow.
Relative position element are in the document flow. But accept offset property to move against its parent container.
Absolute position is taken out of normal document flow. It is position against closest relatively position parent. Accept offset property to move against its position.
Fixed position stays is positioned against viewport. Stays in the view
4. box-sizing
border-box : will factor in padding, content and border into actual width.
5. overflow: hidden/ overflow: auto to make sure a block is in its own column.
6. text-align property
It will align the content's inline and inline-block element to center, left , right or justify.
7. block element vs inline element
a. inline element do not have margin top and bottom. Inline element have padding, border top and bottom but no effect on other element on the document flow. Inline do not have width and height. Its width is whatever content it is taking up. Inline element will stack with other element on the page, side by side (stay "inline").
b. Block element has a width and height and margin and padding property. Block element will take up full width of the document unless it is floated. Floated element are always block element. Block will create a newline from previous element and a create a newline for subsequent element.
c. Inline-block will stay "inline" with other element in the document. But have width, height, padding , margin and border property.
8. CSS Media Queries
The syntax is generally @media (max-width: 700px)
9. em vs rem
em is based on the font-size of parent element. rem is based on outer most font-size.
a. you can use zero font-size to eliminate the white space. Then reset back the font-size in the inner element to 1 rem.
b. comments out the white space between the inline-block element.
2. methods to clear float.
Method One
.group:after {
display: block
content: ""
clear: both
}
Method Two
add a empty div element after the floated element, then add a "clear: both" property.
Method Three
Use "overflow: hidden" within the parent container element. This creates a block formatting context that will cause the parent to expand to contain the width and height of the floated child element.
3. static, relative, absolute, fixed positioning
Static element is the default position. All element are in the document flow.
Relative position element are in the document flow. But accept offset property to move against its parent container.
Absolute position is taken out of normal document flow. It is position against closest relatively position parent. Accept offset property to move against its position.
Fixed position stays is positioned against viewport. Stays in the view
4. box-sizing
border-box : will factor in padding, content and border into actual width.
5. overflow: hidden/ overflow: auto to make sure a block is in its own column.
6. text-align property
It will align the content's inline and inline-block element to center, left , right or justify.
7. block element vs inline element
a. inline element do not have margin top and bottom. Inline element have padding, border top and bottom but no effect on other element on the document flow. Inline do not have width and height. Its width is whatever content it is taking up. Inline element will stack with other element on the page, side by side (stay "inline").
b. Block element has a width and height and margin and padding property. Block element will take up full width of the document unless it is floated. Floated element are always block element. Block will create a newline from previous element and a create a newline for subsequent element.
c. Inline-block will stay "inline" with other element in the document. But have width, height, padding , margin and border property.
8. CSS Media Queries
The syntax is generally @media (max-width: 700px)
9. em vs rem
em is based on the font-size of parent element. rem is based on outer most font-size.
Comments
Post a Comment