Menu
Coddy logo textTech

align-self

Lesson 15 of 15 in Coddy's CSS Flexbox - The Complete Course course.

The align-self property allows to override the flexbox align-items property for individual flex item.

It has the same possible values as align-items:

  • flex-start
  • flex-end 
  • center 
  • stretch
  • baseline

Example,

.item {
  align-self: center;
}
challenge icon

Challenge

Easy

You are given flexbox with three items, add align-self to every flex item.

Use flex-start, flex-end and center values for each item, in any order.

Try it yourself

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="styles.css">
</head>
    <body>
        <div class="container">
            <div>1</div>
            <div>2</div>
            <div>3</div>
        </div>
    </body>
</html>

All lessons in CSS Flexbox - The Complete Course