Jump to content

How to code/style a Gallery section?

Go to solution Solved by tuanphan,

Recommended Posts

Site URL: https://www.townly.com/victoria

Hi,

Looking to make the text in this gallery (simple grid) section on a page:

image.thumb.png.8ef30b6645dc9ed91fc96e7b1f387228.png

look like the text and be moved to the center within the image just like these images (poster) I created:

image.thumb.png.41c046da28e989acd22b69bc05442fbd.png

These examples can be found at https://www.townly.com/victoria.

I'm okay for this change to affect all simple grid galleries.

Appreciate any help.

 

Cheers,

 

Insider

Edited by Insider
Link to comment
On 6/15/2022 at 7:33 PM, tuanphan said:

Can you share link to page where you want to place text over image? We can help easier

This is the page.

https://www.townly.com/victoria

These are the images I want text over image.

image.thumb.png.4b30de6c9de0cf9647faa387bfaf7c36.png

If in case this is not what you are after, can you please be more specific?

I feel like the same question has been asked twice and I just don't want to misunderstand what you are asking

Edited by Insider
Link to comment
  • Solution
On 6/16/2022 at 4:16 PM, Insider said:

This is the page.

https://www.townly.com/victoria

These are the images I want text over image.

image.thumb.png.4b30de6c9de0cf9647faa387bfaf7c36.png

If in case this is not what you are after, can you please be more specific?

I feel like the same question has been asked twice and I just don't want to misunderstand what you are asking

Add to Design > Custom CSS

/* Victoria */
body#collection-62a5989dc5fe2f1af4500e66 {
figure.gallery-grid-item {
    position: relative;
}
.gallery-caption {
    position: static;
}
/* title */
figcaption.gallery-caption .gallery-caption-wrapper p.gallery-caption-content {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 7%;
    transition: opacity ease 200ms !important;
    opacity: 0 !important;
pointer-events: none;
}
.gallery-grid-item:hover .gallery-caption-wrapper p.gallery-caption-content {
    opacity: 1 !important;
}
/* overlay */
.gallery-grid-item-wrapper a:after {
    background: #f4f6ea; /* overlay color */
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity ease 200ms !important;
}
.gallery-grid-item:hover .gallery-grid-item-wrapper a:after {
    opacity: 0.75;
}
/* remove gap */
figcaption {
    padding: 0 !important;
}}

Screenshot_11.thumb.png.6880389d8148e28f56b56bb71edbf589.png

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
On 6/18/2022 at 6:54 PM, tuanphan said:

Add to Design > Custom CSS

/* Victoria */
body#collection-62a5989dc5fe2f1af4500e66 {
figure.gallery-grid-item {
    position: relative;
}
.gallery-caption {
    position: static;
}
/* title */
figcaption.gallery-caption .gallery-caption-wrapper p.gallery-caption-content {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 7%;
    transition: opacity ease 200ms !important;
    opacity: 0 !important;
pointer-events: none;
}
.gallery-grid-item:hover .gallery-caption-wrapper p.gallery-caption-content {
    opacity: 1 !important;
}
/* overlay */
.gallery-grid-item-wrapper a:after {
    background: #f4f6ea; /* overlay color */
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity ease 200ms !important;
}
.gallery-grid-item:hover .gallery-grid-item-wrapper a:after {
    opacity: 0.75;
}
/* remove gap */
figcaption {
    padding: 0 !important;
}}

Screenshot_11.thumb.png.6880389d8148e28f56b56bb71edbf589.png

Excellent thank you.

Not what I asked but I think its better so I'll adapt it. 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.