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
Perpetuity9mo 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
Mannix9mo ago
flex no but you can stack them on top of each other with grid
Perpetuity
Perpetuity9mo ago
I never used grid
Perpetuity
Perpetuity9mo ago
cant I use position:relative
Mannix
Mannix9mo 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
Perpetuity9mo ago
Idk much abt positions been a while worked with html and css
Mannix
Mannix9mo ago
you can check my codepen 1st image is with grid 2nd with position
Perpetuity
Perpetuity9mo 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
Mannix9mo 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
Perpetuity9mo ago
whats the best website to learn html and css again with hands on
Mannix
Mannix9mo ago
don't know really look through #resources maybe you will find something
b1mind
b1mind9mo ago
#learnGrid it's amazing
Perpetuity
Perpetuity9mo ago
alr thanks I thought flex was used more so never touched grid
Want results from more Discord servers?
Add your server