• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/15

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

15 Cards in this Set

  • Front
  • Back

Flexible Box Layout Module


= easier design flexible responsive layout w/out use float or positioning.



## Before Flexbox (iv) layout modes


(i) Block - sections in a webpage


(ii) Inline - text


(iii) Table - 2D table data


(iv) Positioned - explicit position an element

j

How create flex box

add .flex-container parent w/ display: flex; CSS

Flex container properties (6)



(i) flex-direction: iv.

(i) flex-direction: = direction container stacks flex items


i. column; - vertical T to B


ii. column-reverse; - vertical B to T


iii. row; - horizontal L to R


iv. row-reverse; horizontal R to L

Flex container properties (6)



(ii) flex-wrap: iii.


(iii) flex-flow: ii.

(ii) flex-wrap: - specifies whether flex items wrap or not


[wrap;, nowrap; or wrap-reverse;]



(iii) flex-flow: - shorthand set flex-direction & flex-wrap


ex.


.flex-container {


display: flex;


flex-flow: row wrap;


}

Flex container properties (6)



(iv) justify-content:


i. center;


ii. flex-start;


iii. flex-end;


iv. space-around;


v. space-between;

(iv) justify-content: - horiz aligns flex items


i. center; - items align center container


ii. flex-start; (dflt) - items align @ beginning container


iii. flex-end; - items align @ end container


iv. space-around; - items w/ space b4, b/w, & after lines:


v. space-between; - items w/ space b/w lines

Flex container properties (6)



(v) align-items:


i. center;


ii. flex-start;


iii. flex-end;


iv. stretch;


v. baseline;

(v) align-items: - align flex items vertically


i. center; - align items middle container


ii. flex-start; - align items top container


iii. flex-end; - align items bottom container


iv. stretch (dflt); - stretches flex items (fill container)


v. baseline; - align items @ their baselines

Flex container properties (6)



(vi) align-content: property


i. space-between;


ii. space-around;


iii. stretch;


iv. center;


v. flex-start;


vi. flex-end;

(vi) align-content = used align flex lines.


i. space-between; - equal width lines


ii. space-around; - space before, b/w, & after each line


iii. stretch; [dflt] - stretches lines take up rem space


iv.center; - lines in middle container


v. flex-start; - lines @start container


vi. flex-end; lines @end container

remedy Problem Perfect Centering



justify-content: center;


align-items: center;

E

direct child elements flex container auto become flexible (flex) items.

E

Flex item properties (6)



(i) order:

(i) order: INT - specifies order flex items


## 1st flex item d/have appear as 1st item in layout.


## order value must be a # (default value =0)

Flex item properties (6)



(ii) flex-grow: property

(iii) specifies how much flex item grow relative rest flex items


## value must be # (default= 0)

Flex item properties (6)



(iii) flex-shrink:

(iii) specifies how much flex item shrink relative rest of the flex items.


## default value = 1

Flex item properties (6)



(iv) flex-basis property

(iv) specifies initial length flex item (given px)

Flex item properties (6)



(v) flex: property iii.

(v) shorthand for


i. flex-grow,


ii. flex-shrink


iii. flex-basis

Flex item properties (6)



(vi) align-self:

(vi) specifies alignment for selected item inside flex container.


## overrides default alignment set by container's align-items property.