Dandruff causes the scalp to flake and may cause visible flakes on clothing or in the hair. Fungal scalp infections may develop worse dandruff if they have sensitive skin or a very oily scalp. Fungus causes irritation and flakes which may be due to the way the fungus interacts with other factors. Anti-dandruff shampoo can treat many underlying causes of dandruff, including minor fungal infections.