CSS - Layouts Flashcards
Never use ______ for layouts.
Never use tables for layouts.
An element with a float value of _____ or _____ is taken out of the normal flow of a document and shifted to one side of the containing box. The content that follows it in the document wraps around the floated element’s new position.
An element with a float value of left or right is taken out of the normal flow of a document and shifted to one side of the containing box. The content that follows it in the document wraps around the floated element’s new position.
_____: An element is not floated and behaves as normal.
none: An element is not floated and behaves as normal.
______: An element is taken out of the normal flow and is shifted to the left of where it was to otherwise appear, with content flowing around it on the right side of the element.
left: An element is taken out of the normal flow and is shifted to the left of where it was to otherwise appear, with content flowing around it on the right side of the element.
______: An element is taken out of the normal flow and is shifted to the left of where it was to otherwise appear, with content flowing around it on the right side of the element. Think of a small photo that is moved to the right and has text flowing around it;
right: An element is taken out of the normal flow and is shifted to the left of where it was to otherwise appear, with content flowing around it on the right side of the element. Think of a small photo that is moved to the right and has text flowing around it;
You now have the basic idea of how an element behaves when floated.
You now have the basic idea of how an element behaves when floated.
Using _____ for layout was a common web design layout technique. However, there are many things that designers need to understand about floats.
Using floats for layout was a common web design layout technique. However, there are many things that designers need to understand about floats.
What method allows block elements to behave like inline elements (positioned next to each other) AND maintain its widths and heights?
.box {
display: inline-block;
}
______ gives designers a higher level of layout control over multiple children within a parent.
Flexbox gives designers a higher level of layout control over multiple children within a parent.
A flexbox implementation consists of a _____ container (flex container) and ______ elements (flex items).
A flexbox implementation consists of a parent container (flex container) and child elements (flex items).
Flexbox defines how those _______ elements are laid out and how they fit the space available to them.
Flexbox defines how those child elements are laid out and how they fit the space available to them.
What is the syntax for using flex?
.box {
display: flex;
}
<div class="box"> <div>One</div> <div>Two</div> <div>Three</div> </div>
Child elements may be assigned a ______ via the flex-direction property. This determines the “____ ____”. The other axis at 90 degrees to the main axis is called the “______-axis”.
Items may be arranged in a row (____ to _____ to _____) or a column (top to bottom/bottom to top).
Child elements may be assigned a direction via the flex-direction property. This determines the “main axis”. The other axis at 90 degrees to the main axis is called the “cross-axis”.
Items may be arranged in a row (left to right/right to left) or a column (top to bottom/bottom to top).
Therefore, if the following CSS: flex-direction: row;
is applied to the flex-container, the main axis would be _____ and the cross axis would be _______.
Therefore, if the following CSS: flex-direction: row;
is applied to the flex-container, the main axis would be horizontal and the cross axis would be vertical.
If additional layout control is needed, the “_______” property on individual flex-item elements can be used to specify the order of flex-items within the flex container.
If additional layout control is needed, the “order” property on individual flex-item elements can be used to specify the order of flex-items within the flex container.