Jump to content

Add two lines of text next to logo in Header

Go to solution Solved by tuanphan,

Recommended Posts

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;}

 

Untitled.jpg

Edited by Downpour
Added Photo
Link to comment
  • Solution

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;
}
}

 

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.