# Creating a tableless image grid with CSS

**URL:** <https://forum.kirupa.com/t/creating-a-tableless-image-grid-with-css/328415>\
**Category:** web dev\
**Created:** [May 15, 2012, 6:56pm UTC](https://forum.kirupa.com/t/creating-a-tableless-image-grid-with-css/328415 "2012-05-15T18:56:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpf566](https://avatars.discourse-cdn.com/v4/letter/j/ea5d25/32.png) [@jpf566](https://forum.kirupa.com/u/jpf566)\
**Post date:** [May 15, 2012, 6:56pm UTC](https://forum.kirupa.com/t/creating-a-tableless-image-grid-with-css/328415/1 "2012-05-15T18:56:21Z")

</div>

Hey guys, as always I’m trying to do something seemingly simple and am having some bizarre issues. I’m just trying to make a simple image grid without using tables.

[sheffieldfurniture.com/imagegrid/furniture.html](http://sheffieldfurniture.com/imagegrid/furniture.html)  
First issue is, why is there a space between the images here? It seems like it’s adding a margin although Chrome developer tools is not saying that the images have any margin applied to them. I do want to have the images spaced out but I can’t do the math necessary for doing that if some browsers are going to be randomly adding a margin.

[sheffieldfurniture.com/imagegrid/furniturefloat.html](http://sheffieldfurniture.com/imagegrid/furniturefloat.html)  
I was able to fix this by floating everything left. Is this the proper fix? It still bugs me that I couldn’t figure out why the images had space in-between

Let me know if I’m going about this wrong, is this how you guys would do a simple images grid? Also, I suck at math, how would you go about determining how large to make the images and how much margin? The parent container will be 960 Pixels and I’d like rows of 5 across to be centered
