Jump to content

Bring an image to the front that is overlapped with non-transparent header (7.1)

Recommended Posts

Site URL: https://hollymurphy.co.uk

Hi all, 

I cannot for the life of me get this to work. I've added a simple logo to the first section on my homepage, amended the padding and moved the logo up so that it is overlapping the header section. However, the header isn't transparent (because I want definition between the header and the first coloured section) and as a result, half of my logo isn't showing up. I've adde a Z-index for the image and then tried to add a Z-index for the header too but it isn't working. Any idea what css I can use to force the logo image to show up in front of the non-transparent header? Screenshot attached of what I am trying to achieve with the navy circular logo.

Thank you!!!

 

Code used at the moment:

// remove section top padding home //
@media only screen and (min-width:950px){[data-section-id="601345237d00960b62f4786b"] .content-wrapper {padding-top: 0 !important;}}

// remove overflow logo hidden //
@media only screen and (min-width:950px){div #block-yui_3_17_2_1_1617243970469_6136 .image-block-wrapper {
  overflow: visible !important;}}

// overlap image logo home //
@media only screen and (min-width:950px){div #block-yui_3_17_2_1_1617243970469_6136 img {
    bottom: unset !important;
    top: -50% !important;
    right: 0;
  z-index: 999;}}

Header logo example.png

Link to comment
  • Replies 5
  • Views 1.8k
  • Created
  • Last Reply
5 hours ago, HollyM said:

Site URL: https://hollymurphy.co.uk

Hi all, 

I cannot for the life of me get this to work. I've added a simple logo to the first section on my homepage, amended the padding and moved the logo up so that it is overlapping the header section. However, the header isn't transparent (because I want definition between the header and the first coloured section) and as a result, half of my logo isn't showing up. I've adde a Z-index for the image and then tried to add a Z-index for the header too but it isn't working. Any idea what css I can use to force the logo image to show up in front of the non-transparent header? Screenshot attached of what I am trying to achieve with the navy circular logo.

Thank you!!!

 

Code used at the moment:

// remove section top padding home //
@media only screen and (min-width:950px){[data-section-id="601345237d00960b62f4786b"] .content-wrapper {padding-top: 0 !important;}}

// remove overflow logo hidden //
@media only screen and (min-width:950px){div #block-yui_3_17_2_1_1617243970469_6136 .image-block-wrapper {
  overflow: visible !important;}}

// overlap image logo home //
@media only screen and (min-width:950px){div #block-yui_3_17_2_1_1617243970469_6136 img {
    bottom: unset !important;
    top: -50% !important;
    right: 0;
  z-index: 999;}}

Header logo example.png

Could you grant access to the page? Holly Murphy is a cover which has link to other website only

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
On 4/2/2021 at 5:42 AM, HollyM said:

Yes of course, my apologies. It's now on the homepage, the password is password1. Thank you for looking at this, it's really very frustrating!

Try adding this to Design > Custom CSS

/* Overlap image */
body.homepage header#header:after {
    content: "";
    display: block;
    width: 150px;
    height: 150px;
    background-image: url(https://images.squarespace-cdn.com/content/v1/5f3c4b8bedfe540e0412a077/1617247623001-SI3M641D4P0W21L7MBOM/ke17ZwdGBToddI8pDm48kGPMc6ZgBpgYgxrTLJEj2ANZw-zPPgdn4jUwVcJE1ZvWQUxwkmyExglNqGp0IvTJZUJFbgE-7XRK3dMEBRBhUpwqnLU-IIbALxz621gmsD6Lh6Z_NsHxCpu1-0iKRUgTEYbgNyR9rAD2wIx3iSfsD9w/Desktop+top+logo.png?format=300w);
    background-size: contain;
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
}

image.thumb.png.d01b553b29bc6b2e67cf258240682b84.png

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 4/6/2021 at 6:36 PM, HollyM said:

Thank you but sadly this didn't work, nothing appeared when I input the code. I copied and pasted so I'm not sure why it didn't work.

Try adding this to Settings > Advanced > code Injection > Header

<style>
  /* Overlap image */
body.homepage header#header:after {
    content: "";
    display: block;
    width: 150px;
    height: 150px;
    background-image: url(https://images.squarespace-cdn.com/content/v1/5f3c4b8bedfe540e0412a077/1617247623001-SI3M641D4P0W21L7MBOM/ke17ZwdGBToddI8pDm48kGPMc6ZgBpgYgxrTLJEj2ANZw-zPPgdn4jUwVcJE1ZvWQUxwkmyExglNqGp0IvTJZUJFbgE-7XRK3dMEBRBhUpwqnLU-IIbALxz621gmsD6Lh6Z_NsHxCpu1-0iKRUgTEYbgNyR9rAD2wIx3iSfsD9w/Desktop+top+logo.png?format=300w);
    background-size: contain;
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
}
</style>

 

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.