How to align my text in center hor and ver in react

I want to align my text in middle of the video.How do I do it
No description
14 Replies
Perpetuity
PerpetuityOP11mo ago
I saw many posts but most of them said you shld use relative Is there a war I can use flex in thsi
Mannix
Mannix11mo ago
flex no but you can stack them on top of each other with grid
Perpetuity
PerpetuityOP11mo ago
I never used grid
Perpetuity
PerpetuityOP11mo ago
cant I use position:relative
Mannix
Mannix11mo ago
sure you can but it needs to be on a element that wraps both of your element (video and h6) and then use position absolute to put the h6 in the center
Perpetuity
PerpetuityOP11mo ago
Idk much abt positions been a while worked with html and css
Mannix
Mannix11mo ago
you can check my codepen 1st image is with grid 2nd with position
Perpetuity
PerpetuityOP11mo ago
okay I did didnt understand about grid I think I shld watch a yt on it what does this do width:min-content;
Mannix
Mannix11mo ago
i just did it to limit the width of the container to the width of the image since div by default cover 100% of the width you may not need it
Perpetuity
PerpetuityOP11mo ago
whats the best website to learn html and css again with hands on
Mannix
Mannix11mo ago
don't know really look through #resources maybe you will find something
b1mind
b1mind11mo ago
#learnGrid it's amazing
Perpetuity
PerpetuityOP11mo ago
alr thanks I thought flex was used more so never touched grid
Want results from more Discord servers?
Add your server