Remember me

image too big custom code

11 months 1 week ago #1

  • maffeaffe's Avatar
  • maffeaffe
  • Posts: 2086
Hi, I have this custom css code to show the full image i a gallery gridbox:
.ba-image {
width: 100%;
Height: 100%;
margin: 0 auto; /* horizontale centrering */
display: flex;
align-items: center;
justify-content: center;
}


.ba-image img {
width: 100%;
height: 100%;
object-fit: contain;
padding: 10px;
}

It works, except for 1 image, the image in the second to last row next to the valentino logo, and I don't understand why.

11 months 1 week ago #2

  • Viacheslav's Avatar
  • Viacheslav
  • Posts: 28858
Hello,
Thank you for contacting us

Send us a link to page with problem.


Regards,
Vyacheslav, Balbooa.com

11 months 1 week ago #3

  • maffeaffe's Avatar
  • maffeaffe
  • Posts: 2086

11 months 1 week ago #4

  • Viacheslav's Avatar
  • Viacheslav
  • Posts: 28858
You need to add !important;
.ba-image img {
    width: 100% !important;
    height: 100%!important;
    object-fit: contain;
    padding: 10px;
}

Best Regards,
Vyacheslav, Balbooa Support Team

11 months 1 week ago #5

  • maffeaffe's Avatar
  • maffeaffe
  • Posts: 2086
Thank you, but it makes no difference.

11 months 1 week ago #6

  • Viacheslav's Avatar
  • Viacheslav
  • Posts: 28858
At the moment, all the code that you added is working correctly, the image will occupy all 100% of the parent.
the picture is not distorted thanks to object-fit: contain;

It seems we do not understand what result you need to get
Describe in more detail (show on the screen)

Best Regards,
Vyacheslav, Balbooa Support Team

11 months 1 week ago #7

  • maffeaffe's Avatar
  • maffeaffe
  • Posts: 2086
Hi, thank you, this link: ksvbwo-d-o-t-nl.alvast-online.nl/sponsoring/onze-sponsors
see this image (attachment)
Attachments:

11 months 1 week ago #8

  • Viacheslav's Avatar
  • Viacheslav
  • Posts: 28858
We still don't understand what the problem is.
The image is cut off

ksvbwo-d-o-t-nl.alvast-online.nl/images/...1/valkenaar-def.webp

Best Regards,
Vyacheslav, Balbooa Support Team

11 months 1 week ago #9

  • maffeaffe's Avatar
  • maffeaffe
  • Posts: 2086
Hi, it's not in the gallery, see attachment
Attachments:

11 months 1 week ago #10

  • Viacheslav's Avatar
  • Viacheslav
  • Posts: 28858
You need to make it square in photo editor (photoshop)

Best Regards,
Vyacheslav, Balbooa Support Team

11 months 1 week ago #11

  • maffeaffe's Avatar
  • maffeaffe
  • Posts: 2086
But the other logo's are also not square and they show perfectly.
See for example: ksvbwo-d-o-t-nl.alvast-online.nl/images/...1/tropic-parket.webp

11 months 1 week ago #12

  • Viacheslav's Avatar
  • Viacheslav
  • Posts: 28858
You need to make them square fit into a square.
or use masonry layout, it keeps proportions

Regards,
Vyacheslav, Balbooa.com
Powered by Kunena Forum