I am struggling to design a straightforward appreciation screen with bordered text. The current css I have does not adjust responsively when the screen size changes, causing it to appear misaligned. Below are my CSS and component codes. React JS is being used to build this screen.
.thankYouParent {
display: flex;
border: 1px dotted red;
flex-direction: column;
align-items: center;
height: 100vh;
justify-content: space-between;
justify-content: center;
}
.thankYouBox {
display: flex;
position: relative;
text-align: center;
border: 5px solid #ffffff;
text-transform: uppercase;
height: 40vh;
width: 75vw;
justify-content: center;
}
.thankYouText {
font-family: interstateBold;
font-size: 10vw;
color: white;
align-self: center;
}
.borderText {
font-family: interstateRegular;
display: flex;
position: absolute;
color: white;
font-size: 3vh;
background-color: black;
align-self: flex-end;
bottom: -25px;
padding-left: 1vw;
padding-right: 1vw;
}
import React from 'react'
import "../css/ThankYou.css"
export default function ThankYou(){
return(
<div className="thankYouParent">
<div className="thankYouBox">
<label className="borderText"> For visiting us </label>
<label className="thankYouText">Thank You</label>
</div>
</div>
)
}
Initial Design: https://i.sstatic.net/MjZN2.png
Design After Resizing Screen: