How would I turn this into a grid?

You should know by now that how you approach one step in a design depends very much on what else is going on, so before we start, please explain exactly what you want.

Do you want a fixed number of boxes per row? Will the boxes all be the same size? What kind of content will they have?

If this is just a learning exercise, then I suggest that you reread this thread: Does and should [display values] be put on every style tag? and simply try out the different techniques to see how they work. (Save a backup copy of your original code first, so you can always return to it.)