0

I have this html code

<div className="sidebar">
                <div routerLink="" className="navbar-brand">
                    <img alt="" src={brand} width="60" height="60" />
                </div>

                <ul className="nav navbar-nav">
                    <li>
                        {/* Home icon */}
                        <div className="divicon" onClick={() => window.location = "http://localhost:3000"}>
                            <svg className="svgicon-sidebar" viewBox="0 0 14 14" >
                              blahblah
                            </svg>
                        </div>
                    </li>

                    <li>
                        <div className="divicon">
                            <svg className="svgicon-sidebar" viewBox="0 0 14 14">
                            blahblah
                            </svg>
                        </div>
                    </li>
                </ul>
            </div>

But in my css, even if I put flex-direction: column, and I see a proper column, with the ul elements, whenever i try to apply flex-start, its aligns the items horizontally instead of vertically as it should since its a column

    .nav {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start
}
mouchin777
  • 1,428
  • 1
  • 31
  • 59

1 Answers1

1

Use

justify-content: flex-start;

It changes based on the flex-direction

JoshuaK98
  • 381
  • 1
  • 2
  • 11