Flexbox Cant Center Elements

hello so I am trying to do the 3rd rwd challange and I am stuck

my problem is I cant center an item in flexbox

Codepen link to the project: https://codepen.io/clickers331/pen/JjdOVGr

1 Like

You are not using flexbox because you never set the display (display: flex).

BTW, I would not suggest using the body as a main flex container.

1 Like

this what css should like : and put the image and h1 in div with class=β€œnav”

background: linear-gradient(90deg,

  rgba(0,218,142,1) 0%,

  rgba(0,203,170,1) 50%, 

  rgba(0,218,142,1) 100%


font-family: 'Spartan', sans-serif;




background-color: blue;

margin: auto;

width: 50vw;





1 Like

Hello first of all thanks for answering

I have set the display to flex at html tag

1 Like

flex-box we sould give it just to the divs bro not the whole html document