Home > Back-end >  Image fill grid - is it d-flex?
Image fill grid - is it d-flex?

Time:10-12

TL;DR how can I get the images to fill the grid squares on this page.

I am working on a site I inherited that has been through three different web designers so it's a bit of a mess on the back end. It also uses timber/twig/acf which were new to me so I spent last week trying to figure out how everything is configured. I was trying to replicate this archive page so was playing around with the CSS but when I left work Friday everything was fine...this morning suddenly the images don't fill the grid squares. I don't know if something I did changed it and it was delayed bc of caching or if there was an update or what but I would love to change it back before anyone notices. I actually have the old version of the page still open where the images do fill grid squares and have spent all day looking through the code to see what changed but can't find any difference.

CodePudding user response:

It's this css rule that preventing it from taking 100% width:

.rtr-6-grid:not(.knowledge-cta) .p-absolute.p-center div {
    width: 470px;
}

CodePudding user response:

Change this :

<div >
   <div>
     <img src="..." width="1779" height="1779">
   </div>
</div>

To this :

<div >
   <div>
     <img src="..." width="auto">
   </div>
</div>
  • Related