Minimum visibility for VFR is 1500m in class f or g. Fog is defined by its visibility being below 1000m. So how can you be VFR in Fog?
I suspect that you are confusing the definition of VMC (and hence conditions suitable for VFR) and licence limitations on those that do not hold an Instrument Rating.
One of the definitions of VMC (and hence the availability of VFR in Class G) is "Clear of cloud, in sight of the surface" provided the IAS is less than 140kts.