Downpour Posted June 28, 2023 Share Posted June 28, 2023 (edited) I want to add two lines of text beside my logo with different styles. Is this possible at all? Sorry, I'm very new to custom coding. harp-octahedron-kt7y.squarespace.com Password: Potato This is what I have, but I want the smaller line of text ("Graphic Designer") under the larger line ("Name Here"), not under the logo. .header-title-logo a:after { content: "Name Here"; text-transform: uppercase; display: block; color: #8C8C8C; font-size: 24px;} .header-title:after{content:"Graphic Designer"; color:grey; font-size:.9rem;} .header-title-logo a { display: flex; align-items: center;} Edited June 28, 2023 by Downpour Added Photo Link to comment
Solution tuanphan Posted June 28, 2023 Solution Share Posted June 28, 2023 Use this code .header-title-logo a:after { content: "Name Here"; text-transform: uppercase; display: block; color: #8c8c8c; font-size: 24px; position: absolute; top: 50%; left: 90px; transform: translateY(-50%); width: 100%; white-space: nowrap; } .header-title-logo a:before { content: "Graphic Designer"; font-size: 16px; position: absolute; left: 90px; top: calc(~"50% + 15px"); width: 100%; white-space: nowrap; } .header-title-logo a { position: relative; } @media screen and (max-width:767px) { .header-title-logo a:before { left: 70px; } .header-title-logo a:after { left: 70px; } } sayreambrosio, Downpour and antovicodg 1 2 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
Downpour Posted June 28, 2023 Author Share Posted June 28, 2023 This is Amazing! Thank-you so much. tuanphan 1 Link to comment
VisualNotes Posted June 28, 2023 Share Posted June 28, 2023 An alternative would be to design the logo with title and subtitle in a vector application, export it as SVG and include it in the header. I have had good experiences with this, because the SVG is 100% sharp and scalable like an image (thus also responsive). When exporting as SVG you only have to take care that the fonts are converted to paths. Downpour and tuanphan 2 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