Not able to centre Paragraph inside a Div

Here is my code: https://codepen.io/anurag1989/pen/GRGVjXa The main problem is the 'btn' class. I am not able to centre it inside the btn class. Tried making the display property of 'p element' as inline-block but still not working. On opening the inspection tool, I see that the text area of btn class is increasing (leaving white space) which is making the text inside it to look off the centre. Is there any way out for this?
3 Replies
Wolle
Wolle3y ago
Your button has a set width. You can try width: max-content;
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Anurag Gupta
Anurag GuptaOP3y ago
Thanks to all for your comments. Both solutions worked fine.
Want results from more Discord servers?
Add your server