<div className="navContainer"> <div className="brand"> <div className="logo">LOGO</div> </div> <div className="section"> <div className="number number1">123</div> <div className="number">234</div> <div className="number">345</div> <div className="number">456</div> </div> </div>
.navContainer { display: flex; justify-content: center; align-items: center; background-color: black; height: 100px; color: white; margin: 0 auto; } .brand { height: 60px; width: 200px; background-color: blue; } .logo { height: 60%; width: 180px; margin: 10px; background-color: green; } .section { display: flex; background-color: red; width: 900px; height: 60px; } .number { width: 100px; background-color: brown; margin: 10px; } .number1 { flex-grow: 1; }
여태까지는 Flex-grow를 Navbar의 모든 메뉴의 사이즈를 비율로 조정할 때, 사용했다.