The board of supervisors shall at the time of levying taxes for county purposes levy the taxes necessary to raise the various funds authorized by law and certified to it by law, but if the amount certified for any such fund is in excess of the amount authorized by law, it shall levy only so much thereof as is authorized by law.