CharlesAC Posted January 15 Share Posted January 15 How can I center the subtitle "Aspiring Journalist" directly below my name? Below is the code I'm using. .header-title:after{white-space: pre;content:"Aspiring Journalist"; color: black; font-size:.9rem; dispaly: inline; text-align: center !important; postion: center; position: absolute !important; display: block; } url: charlieclewis.com I have never coded before and am figuring it out by perusing this forum. I expected the text-align or position would fix it, but I guess not. Thank you! Link to comment
Solution tuanphan Posted January 17 Solution Share Posted January 17 Change your code to this a#site-title:after { white-space: pre; content: "Aspiring Journalist"; color: #000; font-size: .9rem; text-align: center !important; position: absolute; display: block; left: 50%; transform: translateX(-50%); top: 30px; } a#site-title { position: relative; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment