4 replies [Last post]
gautamz07
gautamz07's picture
Offline
Enthusiast
Last seen: 4 years 5 weeks ago
Timezone: GMT+5.5
Joined: 2014-04-24
Posts: 265
Points: 403

hey guys i was just going through chris coyers examples of flex box and came across the follow interesting article :

align-self

ok so basically when i am using align-self , is the following true :

1. I need to have the following declaration on the parent element:

  -ms-box-orient: horizontal;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -moz-flex;
  display: -webkit-flex;
  display: flex;

2. align-self in no way functions line position absolute , its not really taking the element out of the flow . ???

Thank you .

gautam.

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 2 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

Hi gautamz07, It depends on

Hi gautamz07,
It depends on the browser support you are after.
The browser prefixes just allow browser specific implementation of the spec when it was still in development.

gautamz07
gautamz07's picture
Offline
Enthusiast
Last seen: 4 years 5 weeks ago
Timezone: GMT+5.5
Joined: 2014-04-24
Posts: 265
Points: 403

I was't asking about browser support LOL

Hey tony, thanks for the reply , what i was really asking was weather , i mean is i am going to use align-self is it necessary to use display:flex ??

also my second question was, does align-self take an elemen out of the flow ? like position absolute does ?

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 2 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

Yes it is necessary to use

Yes it is necessary to use display:flex with align-self.
You will have to play around to understand how align-self works, I haven't used it.
I think it still knows about the other flex elements so no it isn't taken out of the flow.

gautamz07
gautamz07's picture
Offline
Enthusiast
Last seen: 4 years 5 weeks ago
Timezone: GMT+5.5
Joined: 2014-04-24
Posts: 265
Points: 403

Thanks Tony

Thanks tony !!!