CSS Rollover effects on Squarespace image blocks

Squarespace boasts a variety of tools to help designers construct beautiful webpages, but sometimes custom code (Squarespace CSS and HTML) is needed to make a webpage truly unique.

In this blog article, I will show you how to create an attractive rollover animation plugin that can be used on Squarespace image blocks.

Here is a preview of the final Squarespace plugin:


Please note:

To target the individual image blocks for the effect, I have used the associated “Block ID’s”. These can easily be found using your browser’s developer tools and inspecting each element; however, I would highly recommend installing the “Squarespace Collection/Block Identifier” plugin if you use Google Chrome, for a quicker and easier solution.

Furthermore, the CSS classes that I am targeting may differ from template-to-template. I used the “Fulton” template for this rollover effect; I would strongly recommend making a note of the classes used in your template before copying and pasting the code.


Preparing the Image Blocks

Before we can add our code, we need to configure our image blocks so that they display both the image title and image description.

This is important as our code will modify these two elements almost exclusively.

Simply add an image block into your webpage > on the “IMAGE” dialogue box that opens up, click on the “Design” tab > select “Poster” > click on “APPLY”.

You can do this as many times as you need to, but this article covers four image blocks displayed in a grid-format.

image block setup.gif

The CSS code

Replace the “Block ID’s” with your own; remember, you don’t need to use four image blocks for this code to work.


I hope you found this useful! Will :)