Justify content :center not working

#video{
    width: 600px;
    height: 200px;
    justify-content: center;
}

or

#content{
margin-top: 20px;
justify-content: center;
}

not working

https://codepen.io/advitya-sharma/pen/eYpoxrj

justify-content is a flexbox property which means you can only use it with an element that has display: flex set on it.

1 Like

oh yess, wonder how you keep track of these

it stopped working with flex-direction:column;

Here is the resource I use to help me with CSS.

https://htmlcheatsheet.com/css/

Your HTML may need to be reworked to include some containers for the video and the rest of the content. That will help separate what you are editing through your CSS.

I think you need to be clear about what you are trying to center here. Are you just trying to center the video, or are you trying to center the video and the form? If it is the latter then you want to concentrate on centering the #content div. Here is a helpful link:

trying to center both video and form