Jump to content

How to insert and display a PNG file as a Portfolio Item's title on a Portfolio gallery page?

Recommended Posts

Posted

I would like to insert and display png files (handwritten titles I've made) in place of the current portfolio item titles displayed on the main portfolio gallery page. Is there code I can use to accomplish this? Any help would greatly be appreciated. 

Screenshot 2023-07-18 at 2.23.43 PM.png

Posted

You could use custom css to add in a psuedo element for each title -- To target the exact sections on this page it would be helpful to have the site URL and password, but the you can follow these instructions to upload the images into your Custom CSS panel, and then use custom css to attach it to the title...

 

However to know exactly what to target we need access to the page!

Posted

You can also use some CSS (Design > Custom CSS) like this to achieve request 

.portfolio-grid-basic .grid-item h3 {
    color: transparent;
    background-size: cover;
    background-position: center center;
    display: inline-block;
}
.portfolio-grid-basic .grid-item:nth-child(1) h3 {
    background-image: url(https://cdn.pixabay.com/photo/2023/05/23/18/12/hummingbird-8013214_1280.jpg);
}
.portfolio-grid-basic .grid-item:nth-child(2) h3 {
    background-image: url(https://cdn.pixabay.com/photo/2023/06/10/05/11/himalyas-8053173_1280.jpg);
}
.portfolio-grid-basic .grid-item:nth-child(3) h3 {
    background-image: url(https://cdn.pixabay.com/photo/2023/06/12/05/12/bird-8057638_1280.jpg);
}

Replace Pixabay with your png url

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.