More CSS Flashcards
Name the four common elements of a webpage layout
Header
Navigational links
Various sections
Footer
Blank at the top that identifies the website
Header
Blank at the top or left side that present the main links for navigating the website
Navigational Links
Blank that include related content
Various sections
Blank at the bottom that contains contact information, copyright, author name, etc.
Footer
Some web pages use a blank, which uses a fixed-width container to envelop the web page contents. Ex: The figure below shows a web page at the top using a fixed layout where the entire contents fit inside 960px. Resizing the browser does not change the width of the web page contents.
fixed layout
A web page that uses a blank allows the page contents to fill the browser, sometimes by using percentages for widths. Ex: The figure below shows a web page at the bottom using a fluid layout where the contents always fit the browser’s width. Fluid layouts make better use of the available space than fixed layouts and do not produce a horizontal scroll bar when the browser is resized.
fluid layout
The blank is a CSS layout mode that provides an efficient way to lay out elements in a container so the elements behave predictably when the container is resized or viewed on different screen sizes.
Flexible Box or flexbox
Many developers find the flexbox layout easier to use than blank elements when creating fluid layouts.
floating
A blank is an element that has the CSS property display set to flex to create a block-level flex container or inline-flex to create an inline flex container. Ex: <div style="display: flex">.
flex container
Flex containers hold blank
flex items
A flex item is a blank of a flex container that is positioned and sized according to various CSS flexbox properties.
child element
The blank property defines the direction of flex items within the container using values:
flex-direction
Name the flex-direction values
row (default)
row-reverse
column
column-reverse
The blank property defines the space between flex items. Ex: gap: 10px; puts a 10px gap between all items.
gap
The blank property justifies the flex items within the container using values:
justify-content
Name the justify-content values
flex-start (default)
flex-end
center
space-between
space-around
The blank property determines if or how flex items wrap onto multiple rows when the container is not wide enough to hold all items
flex-wrap
Name the flex-wrap values
nowrap (default)
wrap
wrap-reverse
A flex item’s width is determined by the combination of what three CSS properties
The flex-basis property
The flex-grow property
The flex-shrink property
Blank sets the initial length of a flex item. The values can be auto (the default), a percentage, or a length unit. The default value auto makes the flex item the same initial length as the content.
flex-basis property
Blank sets a proportion that determines how much of the available container space should be assigned to the item. The default is 0, meaning the size should be based on the item’s content.
Flex grow property
Blank sets a proportion that determines the item’s minimum size. The default is 1, meaning the size should shrink at the same rate as other items when the container width shrinks. A value of 0 means the item should not change sizes when the container width shrinks.
Flex shrink property
The shorthand property blank specifies flex-grow, flex-shrink, and flex-basis together. Ex: flex: 0 1 auto; is the same as flex-grow: 0; flex-shrink: 1; flex-basis: auto;.
flex
Blank is a CSS layout mode that divides a web page into a rectangular grid in which to position page elements.
Grid layout
Grid layout is ideal for designing blank web page layouts.
two-dimensional
A blank is an element that has the CSS property display set to grid to create a block-level grid container or inline-grid to create an inline grid container. Ex: <div style="display: grid">.
grid container
A blank is a child element of a grid container that is by default placed into a single grid cell.
grid item
The blank property defines the grid container’s number of columns and optionally the width of each column. Ex: grid-template-columns: 50px 90px auto auto; specifies 4 values that create 4 columns: the first is 50px wide, the second is 90px wide, and the third and fourth columns are automatically sized to fit the remainder of the grid width.
grid-template-columns
The blank property defines the gap between each grid row and column. Ex: gap: 5px 25px; puts a 5px gap between each row and a 25px gap between each column.
gap
The blank property defines the height of each row. Ex: grid-template-rows: 20px 40px; makes the first row 20px tall and the second row 40px tall.
grid-template-rows
The blank property horizontally aligns the grid items inside the grid container
justify-content
Name the values of the justify-content property
start
end
center
stretch
space-around
space-between
space-evenly
Aligns grid flush with the grid container’s starting edge.
start
Places equal spacing between grid items, including the sides of the grid container.
space-evenly
Places equal spacing between grid items with no space on either side of the grid container.
space-between
Places equal spacing between grid items with half the space on either side of the grid container.
space-around
Stretches the grid items to fill the grid container width.
stretch
Aligns grid in the center of the grid container.
center
Aligns grid flush with the grid container’s ending edge.
end
The blank property vertically aligns the grid items inside the grid container
align-content
Name the values used for align-content
start
end
center
stretch
space-around
space-between
space-evenly
Places equal spacing between grid items, including the sides of the grid container.
space-evenly
Places equal spacing between grid items with no space on either side of the grid container.
space-between
Places equal spacing between grid items with half the space on either side of the grid container.
space-around
Stretches the grid items to fill the grid container height.
stretch
Aligns grid in the center of the grid container.
center
Aligns grid flush with the grid container’s ending edge.
end
Aligns grid flush with the grid container’s starting edge.
start
The justify-content and align-content properties have no effect unless the grid width or height is blank than the grid container’s width or height.
less
A grid item by default appears in a blank based on the ordering of the grid item within the grid container. However, grid items may be positioned at specific grid locations using the column line and row line numbers
single row and column
The blank property lists the grid item’s starting and ending row line numbers. Ex: grid-row: 1 / 3; makes the grid item start at row line 1 and end at row line 3, so the grid item spans 2 rows.
grid-row
The blank property lists the grid item’s starting and ending column line numbers. Ex: grid-column: 1 / 4; makes the grid item start at column line 1 and end at column line 4, so the grid item spans 3 columns.
grid-column
The blank property lists the grid item’s starting and ending row and column numbers. Ex: grid-area: 1 / 2 / 3 / 4; makes the grid item start at row line 1 and column line 2 and end at row line 3 and column line 4, so the grid item spans 2 rows and 2 columns.
grid-area
Grid items may be assigned names with the blank.
grid-area property
The grid container’s blank property specifies the grid layout using the named grid items.
grid-template-areas
The CSS blank property gives developers more control over where elements should appear in the browser.
position
position has what four possible values:
static
relative
fixed
absolute
blank positioning positions the element relative to the nearest positioned ancestor
Absolute
Blank positioning positions the element relative to the viewport in a fixed location
Fixed
Blank positioning positions the element relative to the element’s default position
Relative
Blank positioning is the default positioning
Static
Fixed positioning places the element at a fixed location in the viewport, and blank does not move the element.
scrolling
A blank is the visible area of a web page
viewport
The blank is detached from the normal flow of elements in the page and is layered on top of the page contents.
fixed element
Absolute positioning is similar to fixed positioning except for what two things:
The position is based on the nearest positioned ancestor element that uses fixed, absolute, or relative positioning. If no positioned ancestor element exists, the element is positioned relative to the document body.
An absolute-positioned element scrolls with the document unless an ancestor element is using fixed positioning.
When a relative, absolute, or fixed element is placed on top of another positioned element, the element that is blank in the HTML is placed on top.
specified last
The CSS blank property is used to specify a relative distance that orders the appearance of elements. Elements with higher blank values are placed on top of elements with lower blank values.
z-index
Shadows are added to text using the CSS property blank
text-shadow
Name four values used for text-shadow
offset-x
offset-y
blur-radius
color
Horizontal pixel offset of shadow
offset-x
Vertical pixel offset of shadow
offset-y
Optional shadow color (default is usually the current CSS color)
color
Optional shadow blur (default is 0)
blur-radius
The CSS property blank adds a shadow to the box around an element
box-shadow
Name six possible values of box-shadow
inset
offset-x
offset-y
blur-radius
spread-radius
color
Optional value that draws the shadow inside the box (default is outside the box)
inset
Optional shadow color (default is usually the current CSS color)
color
Positive value causes shadow to grow, negative values to shrink (default is 0)
spread-radius
Optional shadow blur (default is 0)
blur-radius
Vertical pixel offset of shadow
offset-y
Horizontal pixel offset of shadow
offset-x
An element border’s corners can be rounded using the CSS property blank
border-radius
If a border-radius has blank all four corners are equally rounded
Single value
If a border-radius has blank. First value is top-left and bottom-right corners, second value is top-right and bottom-left corners
Two values
If a border-radius has blank. First value is top-left, second is top-right and bottom-left, third is bottom-right
Three values
If a border-radius has blank. First value is top-left, second is top-right, third is bottom-right, fourth is bottom-left
Four values
Each corner may also be assigned a radius using what four CSS properties
border-top-left-radius
border-top-right-radius
border-bottom-left-radius
border-bottom-right-radius
The CSS property blankl renders an element’s border using sections of an image.
border-image
The border image takes the place of any border properties specified by blank.
border-style