Grid Format Icon resize

Grid Format Icon resize

by Greg Barber -
Number of replies: 3

Hi,

I am playing around with the layout of the grid format and am trying to remove the apparent size difference between the .image_holder div and the image it contains.

If I inspect the div itself, it's size is reported as 218px x 140px.  So I give the div an overflow: hidden; and make my image the correct size.

Like this:

.course-content ul.icons li .image_holder {
width: 218px;
height: 140px;
overflow: hidden;
border: 1px solid #ddd;
background-color: #f1f2f2;
text-align: center;
vertical-align: middle;
}

However despite my image being exactly the same size as the div it is going in and the div not having any padding etc.  The image gets resized to 210px x 136px resulting in an ugle portion of the div background showing around the bottom and right of the image.

I have seen this also in the example images on the page you download the format from.

Has anyone had success correcting this?

Greg

Average of ratings: -
In reply to Greg Barber

Re: Grid Format Icon resize

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Greg,

The images in the download area are out of date.  The image gets resized to 210px by 140px not 210px by 136px in the latest M2.5 version.

Which version of the format are you using on which version of Moodle?

Cheers,

Gareth

In reply to Greg Barber

Re: Grid Format Icon resize

by Yvette Drager -

Hi Greg and Gareth,

Our team have been having the same issues and frustrations with the Grid format.

We are currently running 2.3.2, hosted with Netspot.

Does anyone have any ideas?

Cheers

Yvette

In reply to Yvette Drager

Re: Grid Format Icon resize

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Yvette,

Umm, yeah!  Give me time to fix it!  That is the size of the icon relative to the container.  If you mean the functionality described in CONTRIB-4099 - then that is a different matter - please look at the tracker for details.

Gareth