CSS align-items property

CSSWeb DevelopmentFront End Technology

Use the align-items property to align the flex items.


You can try to run the following code to implement the align-items property −

Live Demo

<!DOCTYPE html>
         .mycontainer {
            display: flex;
            background-color: orange;
            align-items: center;
            height: 150px;
            width: 600px;
         .mycontainer > div {
            background-color: white;
            text-align: center;
            line-height: 40px;
            font-size: 25px;
            width: 100px;
            margin: 5px;
      <div class = "mycontainer">
Updated on 03-Jul-2020 10:38:37