Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

How to flex-start items at the beginning of the container using CSS ?

  • Last Updated : 06 Apr, 2021

The flex-start value of the justify-content property allows you to place the items at the start of the container. The flex-start indicates the flex-direction while the start indicates the writing-mode direction. The children of the parent container are allowed to align at the start of the parent container or div.

Follow the given steps:

1. Create HTML file: Use a div with an id name = “GFG” (as per your choice). Inside it make three divs.

2. Create CSS file: Specify the property of the div as

  • display: flex;
  • flex-direction: row ;
  • justify-content: flex-start;



<!DOCTYPE html>
        #gfg {
            width: 400px;
            height: 100px;
            border: 2px solid #ddd;
            display: flex;
            justify-content: flex-start;
            flex-direction: row;
        #gfg div {
            width: 100px;
            height: 70px;
            border: 1px solid black;
            margin: 0px 2px;
            background-color: #ff7100;
        How to flex-start items at the 
        beginning of the container 
        using CSS?
    <div id="gfg">


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!