I've used flexbox to center a video on the page:
.pf-video-container {
width: 100%;
display: flex;
justify-content: center;
}
Now, I want to horizontally align text directly under this video. How can I accomplish this? In other words, how can I align the div I've called pf-video-text-container
directly under the video? I want it to be left aligned directly under the video, not centered or anything like that.
Here is the relevant code:
<div className="pf-main">
<div className="pf-video-container">
<ReactPlayer url="https://vimeo.com/475160747" controls />
</div>
<div className="pf-video-text-container">
<p>Sembrando Lucha</p>
<p>
A small town confronts the expansion of an immigrant detention
facility in their backyard. The struggle continues, support the
community of McFarland by sharing and using our toolkit:
bit.ly/GEOoutMcFarland
</p>
</div>
</div>
The CSS:
.pf-main {
border: 1px dashed black;
width: 100%;
font-size: 1.5rem;
}
.pf-video-container {
width: 100%;
display: flex;
justify-content: center;
}