How to edit number of text columns with images, looking for 5 in a row

I am using the Spark theme and the default number of text with columns in a row is 4, I edited the code to display 5, but when I set the slider to 5, it lines them up vertically, how do I make it horizontal? When It is set to 4 it splits into 2 rows.