according to vfr/vmc rules
Starting point for VFR is min flight vis 8km, min distance from cloud 1000ft vertically and 1500ft horizontally.
But:
Below FL100 Class D, E, F & G
Vis 5km, 1500m and 1000ft from cloud.
At or below 3000ft amsl Class D & E
Vis 5km, 1500m and 1000ft from cloud.
if 140knts or less Vis 5km, Clear or Cloud, in sight of surface.
At or below 3000ft amsl Class F & G
Vis 5km, Clear or Cloud, in sight of surface.
And isn't Fog a really Low level Cloud???