Jump to content

Help trying to add Text on image and Expansion of Image

Go to solution Solved by jamarogonzalez,

Recommended Posts

Hello I am currently trying to customize my site and I like the format of the page and how my pictures are laid out (currently in the Grid:Masonry gallery style) but I do wish I was able to open up the images as its possible in the “Grid:Strips” gallery style format. Is there a way to add code for this?  Also I would love to be able to add the bio of the image into the picture when you hover over the picture such as in this photographers site (https://www.calebknueven.com). I also want to disable right click on my photos. 

My site is https://johanamaro.com

Edited by jamarogonzalez
change of header and still no help, added tags
Link to comment
  • jamarogonzalez changed the title to Help trying to add Text on image and Expansion of Image
  • Replies 7
  • Views 1.6k
  • Created
  • Last Reply

Top Posters In This Topic

https://johanamaro.com/

To achieve this, you need to enable Gallery Caption + edit some images and add some text first, then we can give code to achieve your request

Gallery Caption1 Min

With some bigger version on click, when you edit Section >> It has an option "Lightbox" somewhere, I think it is under Captions option, you can check there

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

Thank you I added the lightbox I had not noticed that before hand. I also turned on captions so that code can be created for the captions. By the way I used your guide on disabling right click which I found on your site. 

Edited by jamarogonzalez
Adding a comment
Link to comment

You can use this code to Website > Website Tools > Custom CSS

body.homepage {
/* Gallery hover - with No Link */
figure[class*="gallery"]:not(.gallery-slideshow-item) {
    position: relative;
}
.gallery-caption {
    position: static;
}
/* title */
.gallery-caption 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;
}
figure[class*="gallery"]:hover .gallery-caption-wrapper p.gallery-caption-content {
    opacity: 1 !important;
}
/* overlay */
div[class*="-item-wrapper"]: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;
}
figure[class*="gallery"]:hover div[class*="-item-wrapper"]:after {
    opacity: 0.75;
}
/* remove gap */
figcaption {
    padding: 0 !important;
}
}

 

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
  • Solution

For anyone looking for the solution This is the custom CSS code.  Tuan resolved it privately. Rember this is for version 7.1 

body.homepage {
/* Gallery hover - with No Link */
figure[class*="gallery"]:not(.gallery-slideshow-item):not(.gallery-lightbox-item) {
    position: relative;
}
.gallery-caption {
    position: static;
}
/* title */
.gallery-caption 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;
}
figure[class*="gallery"]:hover .gallery-caption-wrapper p.gallery-caption-content {
    opacity: 1 !important;
}
/* overlay */
div[class*="-item-wrapper"]: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;
pointer-events: none;
}
figure[class*="gallery"]:hover div[class*="-item-wrapper"]:after {
    opacity: 0.75;
}
/* remove gap */
figcaption {
    padding: 0 !important;
}
}

 

Edited by jamarogonzalez
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.