Jump to content

Flatiron: adding hover state to logo

Recommended Posts

  • Replies 6
  • Views 561
  • Created
  • Last Reply

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.