Advice generator app

Solution retrospective
Q Is there any way to optimize the code. Q Also regarding centre the card. I follow the standard way to centre any element with respect to whole window " top: 50% ; left:50% transform(-50%,-50%)". But I like to understand the inner working how it centre it. Please Explain?
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Sahil Sharma's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord