Jump to content

Locked image on top of content when scrolling

Go to solution Solved by tuanphan,

Recommended Posts

  • Replies 6
  • Views 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

Posted
18 hours ago, Flinx said:

Hi there!
Does anyone have an idea how to make this effect, where there is an image locked on top of all content on all screens? 
 

https://thitthyrring.cargo.site/Archive

 

Thank you!!

Can you share your website URL?

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

Posted

Thank you Tuanphan! All pages would be using the same image (a png with a name). How would you make it stick across pages? 

 

Thanks a lot! 

  • Solution
Posted
On 12/14/2023 at 4:19 PM, Flinx said:

Thank you Tuanphan! All pages would be using the same image (a png with a name). How would you make it stick across pages? 

 

Thanks a lot! 

Add to Code Injection > Footer

<img src="https://cdn.pixabay.com/photo/2023/06/01/05/58/ocean-8032698_1280.jpg" width="100px" class="tp-sticky-img"/>
<style>
  img.tp-sticky-img {
  	position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 999;
  }
</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!)

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.