Jump to content

Background image, rollover and clickable?

Go to solution Solved by tuanphan,

Recommended Posts

Hi All

I have 3 sections on my homepage that use background images.

Is it possible using CSS to make these clickable links? So they can link to my  product category pages.

Currently they link to product category pages via simple text links, which is a little clunky…

Also if clickable background image is possible can you also add a hover state, such as an image overlay?

url : Inkcandy.co.uk

many thanks in advance.


 

 

IMG_2844.png

Link to comment
  • Replies 3
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

First, edit 3 sections > Add a Code Block > Paste this code. Change /who-we-are to link what you want.

<a href="/who-we-are" class="section-clickable"></a>

Make A Section Clickable 01 Min

Here is just an example

Make A Section Clickable 02 Min

Next, use this code to Website > Website Tools > Custom CSS

/* section clickable */
a.section-clickable {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99;
}
.code-block {
	position: static !important;
}

Make A Section Clickable 03 Min

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

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.