What has white-space: nowrap got to do with this? You only need it when you don’t want words or inline elements not to wrap.
I’m guessing you added it as a hack because your inline- block method was wrapping earlier than you wanted because you hadn’t taken care of the white space between and after inline and inline-block elements. Then you added another hack by adding an unneeded div to hold each 4 inline-block elements because they were not wrapping anymore
It’s just another example of why the method you chose was not the correct method in this case although you could beat it into submission.
I probably won’t be able to answer any more questions properly for a week or so as I am not at home and only have a mobile to type with.