I'm struggling to understand Gauss's law for magnetism, which states that the net magnetic flux through any closed surface is always zero. I understand why it holds true if you have a single magnet creating a magnetic field, because the field lines form a closed loop and therefore must both enter and exit the Gaussian surface.
But, I don't understand why it holds true for the magnetic field created by a pair of magnets. For example, in the image below there are field lines in the space between the north pole of the left magnet and the south pole of the right magnet... but those don't look like closed loops to me. Couldn't you construct a Gaussian surface that intersects those lines thus creating net flux? What am I missing here?