Welcome to the forum Kim, the condition you have described looks like Seborrheic Dermatitis to me. For acute flares you may apply low potency steroids like 0.5% hydrocortisone (maximum 5-6 days) which will help reduce the inflammation. In addition to steroid, topical antifungal is a must (never use steroid alone) Definitive therapy is topical ketoconazole/clotrimazole cream in combination with topical metronidazole and 0.5% hydrocortisone.
For hairline you may apply the same medications. If its affecting your hair, you may wash with shampoo containing ketoconazole/tar/selenium/zinc/salicyclic acid every alternate days.
Another condition that might sometimes mix with seborrheic dermatitis is Rosacea, which tends to aggravated by several factors like heat, cold, hot and spicy foods, emotional stress etc. But the way u have described favors Seborrheic Dermatitis..
Anyway, if you have any questions, don't hesitate to ask.