Flex is Weird or I'm Stupid ?

gvt

GameTime2022

Posted on October 2, 2024

Flex is Weird or I'm Stupid ?

Here i have an html :

 <aside>
      <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">Product</a></li>
        <li><a href="#">Support us</a></li>
        <li><a href="#">Exit</a></li>
      </ul>
    </aside>
Enter fullscreen mode Exit fullscreen mode

css :

aside {
  min-height: 100vh;
  background: rgb(243, 77, 77);
  width: clamp(150px, 20%, 300px);
  padding-top: 10px;
  display: flex;
}

aside ul {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
  width: 100%;
  gap: 100px;
  list-style: none;
}
Enter fullscreen mode Exit fullscreen mode

when i remove display flex from the aside every list item just have small size to center and stuff but when i add it it works but i dident set a direction align items or so in the aside i just did flex could someone explain this to me ?

💖 💪 🙅 🚩
gvt
GameTime2022

Posted on October 2, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related