I completely ripped all my hair off with this very frustrating and weird CSS issue that I am experiencing.
I use the Bones templateplate to make a website, and it was great so far ...
It uses a fluid grid system, and I recently tried to create a simple gallery that I made into a grid (4 images, each of which is wrapped in a quarter of a column, with the first / last classes added to the first / last images).
If you hover over images (especially noticeable in the first three for some reason), you will notice that they change the width by a pixel or two for some crazy reason. Images are set to max-width:100% , and I feel like it's somehow the culprit, because if you give the images a “fixed” width (example .gallery-icon img {max-width:165px;} , it fixes a problem, but being a liquid grid, I can’t go down this route, because when I change the browser size the image will remain 165 pixels, and even if I set 4 different widths depending on the media, between the sizes of the media, the images will not align correctly.
If it weren’t for the transition effect (if I turn off transition , the images below opacity are fine, but without animation), it will work the way I want it to work: (
Please help the guys!
Here is an empty demo site that runs code coding, and nothing more than a gallery on the page. Let me know if you see a shaking problem.
(I could not recreate it on jsfiddle, so I installed it on the old domain where I was lying, hehe)
EDIT: I just noticed that the problem seems to be happening with images that are larger than the div in both width and height. 1 + 3 images is this and they have an error, while 2.4 images seem to be in order? and 2 + 4 images have a lower height than the div ..... But even if I set the max-height images, the problem will continue.
EDIT2: Added a quick video to show the problem (latest versions of Firefox and Chrome) http://www.youtube.com/watch?v=uL81hLfMvvw