SEMrush

Monday, 19 December 2016

CSS3 FlexBox children properties


CSS3 FLEX BOX (cont...)


Properties Of Children :

1). Order :-
  • To give order to the child elements of a flex container corresponding to remaining elements.
  • Default value is zero
  • The the child element with lowest order value is align first.
2). Margin :-

  • To give specific margin for the child elements.
  • margin-right :auto; will add extra space to the right of corresponding element.
  • The absolute centre property ,if we give margin:auto; for an element it will placed on absolute centre of corresponding flex container.

3). Align-self :-

  • give alignment for corresponding child element.
  • Overrides flex container's alignment property.
  • Values :
  1. flex start – align to the start of flex container..
  2. flex-end - align to the end of flex container.
  3. centre – align to the center of the flex.
  4. baseline – align to the baseline
  5. stretch – stretch the element to the parent element.
4).flex :-

  • to give length to a child element relative to the rest of the flex-items inside the flex container.
  • Overrides the width property.

Supported In:


  • IE 10+ (with -ms)
  • Mozilla 2 + (with -moz) 28+
  • chrome 4+ (with -webkit) 21+
  • safari 3.1+(with -webkit) 6.1+
  • android 2.1+(with -webkit) 4.4+     

No comments:

Post a Comment