View Full Version : Grid resize on window resize, works differently in chrome and firefox

6 Jun 2012, 6:21 AM
I have grid with images in cells. I am rendering images as per some business logic using defaultRenderer and metadata.css using div class. Like below -
return '<div class="'+meta.css+'">&nbsp;</div>';

Now the requirement is, when window is resized, grid panel should get resized accordingly. But images should remain same size all the time.

I tested default behavior -
Chrome browser - when window resized, grid panel resized, images in grid cells also get resized
Firefox browser - when window resized, grid panel resized, images in grid cells dont get resized (My requirement is this)

Below are screenshots for reference -
Firefox Image - grid images wont get changed when window resized, (I need this behavior)

Chrome Image - grid imgae gets resized as per window resize

Please suggest me how to set image size fix so that it wont be changes when grid is resized.3600736008

11 Jun 2012, 6:44 AM
Did you specify the size of the images or the div?

13 Jun 2012, 2:46 AM
Thanks for your suggestion. I was using '%ge' background-size, which was causing images to shrink when column is re-size.

Now I am giving absolute background size, so it works as expected.

before -
background:url(../images/img1.png) center no-repeat!important;

after -
background:url(../images/img1.png) center no-repeat!important;
background-size:50px 50px;

Thanks!! ~o)