How to make spaces in between Gui boxes being made in for loops?

I have a for loop that generates rows of GUI ,but I don’t seem to know how to make the boxes have spaces in between them. Anyone have an idea of how to do this?

Here it is

cols is the number of columns and buttonsize is the size of the buttons

for(int x = 0; x < inventorySpaces; x++)
			{
				//EMPTY INVENTORY SLOTS
				GUI.Box(new Rect((x % cols) * buttonSize , (int)x / cols * buttonSize,buttonSize, buttonSize), string.Empty, buttonStyle);
			}

Well, instead of xbuttonSize and ybuttonSize you just do

x*(buttonSize+hspace)

and

y*(buttonSize+vspace)

(That’s kind of elementary school math ;))