Strange issue in firefox, I have 4 images floated next to each other with a width of 25% of their container. These images all sit flush next to each other, but as soon as I use an image that contains text then as i resize the browser to change the width of the container the images don't always sit flush, they seems to shrink by a px.
HTML
<img src="image.jpg" />
<img src="image.jpg" />
<img src="image.jpg" />
<img src="image.jpg" />
CSS
img {
width: 25%;
float: left;
}
The img tags seems to take up the correct space, it's just the actual image. As i've applied a background to the img which is visible when resizing.
See the below jsfiddle to demonstrate the issue. The top is a row of images with no text, as you can see they sit fine. The 2nd row is same size images but with text and as you resize you'll see the blue come through from the background applied to the img.
Note this only happens in firefox, all other browsers seem ok.
I guess it's to do with the way firefox is calculating the width based on the 25% but is there any work around.