1

Im trying to align with flexbox one item to the left and one to the center (as seen in the image below)

Image

I tried using justify-content: center; on the flexbox container and justify-self: flex start; on the first child, but it didn't worked.

.menu {
  width: 39.3rem;
  height: 4.8rem;
  background-color: rgba(0, 0, 0, 0.19);
  display: flex;
  align-items: center;
  padding: 0 2.15rem;
  position: fixed;
  z-index: 1;
}
.menu__button{
  background: none;
  border-style: none;
}
.menu__button-icon{
  width: 2.7rem;
}
.menu__logo{
  width: 15.7rem;
  margin-left: auto;
}
.menu__logo-img{
  width: 100%;
}
<div class="menu">
        <button class="menu__button" id="menu__button">
          <img
            class="menu__button-icon"
            src="./images/burger_menu.svg"
            alt="menu"
          />
        </button>
        <figure class="menu__logo">
          <img class="menu__logo-img" src="./images/logo.svg" alt="logo" />
        </figure>
      </div>
roguesquid
  • 33
  • 6

0 Answers0