Jump to content

Flatiron: adding hover state to logo

Recommended Posts

Add to Home > Design > Custom CSS

header#topBar .siteTitle:hover img {
    visibility: hidden;
}
header#topBar .siteTitle:hover a {
    background-image: url(https://beaverhero.com/wp-content/uploads/2019/07/coffee-beans-1082116_640-min.jpg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

@tuanphan It seems to mostly be working, but on hover the image is getting cut off (it's the same size as the original image that it's replacing) - any idea of how to fix that? This is the code I'm using (same as above), I'll also attach a screenshot - thank you!

 

header#topBar .siteTitle:hover img {
    visibility: hidden;
}
header#topBar .siteTitle:hover a {
    background-image: url(https://static1.squarespace.com/static/5b6a1ca95417fc8b395b5d7d/t/5e5eceac961f0532348cb896/1583271596165/tyler-elise-wink-01.png);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

 

Screen Shot 2020-03-03 at 4.41.11 PM.png

Edited by tylerelise
typo
Link to comment
19 minutes ago, tylerelise said:

@tuanphan It seems to mostly be working, but on hover the image is getting cut off (it's the same size as the original image that it's replacing) - any idea of how to fix that? This is the code I'm using (same as above), I'll also attach a screenshot - thank you!

 

 

Which plan do you use? Personal or Business. 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 3/4/2020 at 10:19 PM, tylerelise said:

@tuanphan personal - is this something you'd only be able to do with a business plan?

Edit above code to

header#topBar .siteTitle:hover img {
    visibility: hidden;
}
header#topBar .siteTitle:hover a {
    background-image: url(https://beaverhero.com/wp-content/uploads/2019/07/coffee-beans-1082116_640-min.jpg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    height: 100%;
    display: block;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.