Question

Positioning a image with css in gallery element

  • 18 October 2021
  • 3 replies
  • 38 views

Hello everyone,

I’m trying to position an images within a gallery element using CSS, and for some reason I am at a loss trying to target the “Class” for that particular image. I’ve attached an image for reference, is this even possible?

 

Thank you in advance.

 


3 replies

Userlevel 6
Badge +1

When you say you’re trying to position it, are you targeting the anchor (the link) or the element/container in which it sits? If not the latter, try that.

So basically I am trying to reposition the image within the viewable area of the gallery grid, so that more parts of the image is present within the frame ( hope that I am wording this correctly) I’ve attached another screen shot for clarity.

Thank you

 

 

So here is the solution to this dilemma in case anyone else comes across this same scenario. 

 

Try this: 
selector .e-gallery-item:nth-child(2) .e-gallery-image-loaded {
background-position: center 20%; 
}

Adjust height with % or px, as you need.

 

Thanks to Muhammad Iqbal Mauludy over at Facebook Elementor group.

 

Reply