Jump to content

How to use code block to insert a floating image

Recommended Posts

  • Replies 3
  • Views 4.9k
  • Created
  • Last Reply

There has some ways to do that.

1. Insert image tag to Footer  Code Injection

<img src="enter image url here" alt="circle image" class="fixed-img"/>

then insert this code to Home > Design > Custom CSS

.fixed-img {
	position: fixed;
	top: 50%;
	right: 20px;
	z-index: 999;
}

2. Insert Image Block, then use CSS

.i-dont-remember-image-class-name {
	position: fixed;
	top: 50%;
	right: 50px;
	z-index: 999;
}

 

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
  • 10 months later...
On 11/7/2020 at 2:18 AM, HannahZoe said:

@tuanphanhow would I be able to make this image as an active link? I want to link to my contact page 🙂

Try edit this

<img src="enter image url here" alt="circle image" class="fixed-img"/>

to this

<a href="/contact" class="fixed-img"><img src="enter image url here" alt="circle image"/></a>

 

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.