Jump to content

Add border to all gallery images in 7.1? Bonus: exclude logo from border addition

Go to solution Solved by tuanphan,

Recommended Posts

Hi there! I'm wondering what the code would look like to add borders to all of my images in galleries (!!) without adding a border to my logo image? I'm in 7.1. When I used to be in 7.0, I added borders to my images (thanks @tuanphan!) but couldn't ever figure out how to exclude the logo image from getting that border.

On YouTube I figured out how to code a border for an image inserted as a block. I'm just having a hard time figuring out how to get borders on images that are part of a gallery.

Thanks for your help!

FYI site password is flute43 if you are trying to view it
 

Link to comment
  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

21 hours ago, Andrea_K said:

Oops, sorry I thought the original post had included that!

Url: andreakloehn.com

Password: flute43

Thanks for your help!!

Add border to 2 images?

image.thumb.png.87dbbad1b13305386992073d83d83c92.png

Add to Website > Website Tools > Custom CSS

a.grid-item {
    border: 2px solid #f1f;
}

image.thumb.png.49afbec32b3626cf32c199b3d54e63f6.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Thanks so much!! Just a few further questions: 

1. When I added the code as follows (just changed a bit for the color I wanted), the border didn't quite fit the images on the bottom of the image. I'll attach a photo below. Any way to fix this issue?

a.grid-item {
    border: 4px solid rgba(0,3,105,1);
}

2. I'd also like to include borders in a few other galleries throughout my website (links below). It seems like the code only worked for some of the pages with galleries, and none of the following (which are all galleries linked within a gallery) had a border show up. Is there a variation on the code that would include the borders in these galleries?

https://www.andreakloehn.com/work/art

https://www.andreakloehn.com/commissions/dvso

https://www.andreakloehn.com/commissions/portraits

https://www.andreakloehn.com/commissions/uofcolorado

Screen Shot 2023-09-07 at 11.09.42 PM.png

Link to comment

#1. Change code to this

.grid-item .grid-image {
    border: 4px solid #000369;
}

That code for Portfolio Items only. If you use Gallery, gallery needs a difference code

#2. With gallery use this code

.gallery.gallery-section-wrapper figure {
    border: 4px solid #f1f;
}

image.thumb.png.c1f567e2f52457f92f3d62a82788898f.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Got it, I didn't realize the gallery and portfolio sections needed different code, but that makes sense. The gallery code worked great—thank you!!

There was just one problem with the new portfolio code. Now it looks like the hover overlay doesn't cover the entire image (screenshot below). Any ideas on how to fix this?

Screen Shot 2023-09-09 at 8.05.26 PM.png

Link to comment
  • Solution
On 9/10/2023 at 9:17 AM, Andrea_K said:

Got it, I didn't realize the gallery and portfolio sections needed different code, but that makes sense. The gallery code worked great—thank you!!

There was just one problem with the new portfolio code. Now it looks like the hover overlay doesn't cover the entire image (screenshot below). Any ideas on how to fix this?

Screen Shot 2023-09-09 at 8.05.26 PM.png

#1. Change #1 code to this

.grid-item .grid-image, .portfolio-overlay {
    border: 4px solid #000369;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.