The oils in the sunscreen that you used on your daughter's head probably did help to loosen up the cradle cap. Cradle cap is actually a buildup of oil probably caused by an overactive sebaceous gland in the scalp. The buildup of oil in certain areas causes the skin cells of the scalp (as well as hair) that are being shed normally to clump together and stick like glue to the scalp and surrounding hair. The absolute best way to treat it would be to massage the scalp with a bit of olive oil to loosen the clump, wash with a gentle but effective shampoo, lightly condition, and brush hair and scalp with a soft bristled brush on a regular basis. Not washing and brushing the hair will cause a worsening of the condition and not using a light conditioner may also worsen the problem.
If you would like your daughter to wear a hat outside rather than using greasy sunscreen to protect her scalp try telling her that you will not be going outside until the hat is on. Tell her that you can stay outside as long as the hat is on, when she is done wearing the hat, or removes the hat at any point, you will need to go inside. At 2 1/2 she is old enough to understand that kind of reasoning and associated consequences. You may need to model the behavior by wearing a hat yourself at first.
The use of cortisone cream should be reserved only for extreme cases of eczema. Long-term use of cortisone causes a thinning of the skin (making it more prone to laceration and injury) and hypersensitivity. Cortisone creams should never be used on skin that is already thin and therefore very delicate. Your child's skin is already thin and delicate simply because she is a young child. For an adult or older child areas to avoid application would include the face, genitals, armpits, etc.
There are other very significant adverse effects to the long-term use of steroid creams such as Cortisone. A small amount of the steroid is absorbed into your daughter's bloodstream through the skin with every application. Long term exposure to corticosteroids of any kind cause extreme behavioral problems including insomnia, retardation of growth in children, depression, personality changes and even (I've seen it) psychotic behavior. Now, i don't mean to be an alarmist when I mention these things. I am sharing them with you because I believe most people are not aware of the possible side effects often just assuming that because a medication is offered over-the-counter that it is always safe to use. Any use of Cortisone, Prednisone and other steroids (inhaled,oral, or topical) should be taken with extreme caution.
Other ways to treat eczema include colloidal oatmeal baths, make sure your daughter's baths are never hot (warm water is better for the skin). Don't ever use anything on her skin with fragrance (consider any laundry detergent, fabric softener or even dryer sheets...if there are any fillers or fragrance there is a strong possibility they may be contributing to the problem). Every time her skin gets wet immediately apply a cream-based, fragrance-free, preferably organic lotion. You can also apply a small amount of Vitamin E oil directly to each patch. Make sure she is drinking lots of plain water as well. My dermatologist recommends the use of a lotion called CeraVe by CORIA (www.cerave.com). It's a rather lightweight lotion and must be applied every single time the skin gets wet in order to work but it does work very well. It's not cheap, I purchase it from Walgreens in a 12 oz. pump for about $15.
Many people believe there is a strong link between food sensitivity (not allergy) and eczema. If you would like to explore this possibility with your daughter you should look into trying an Elimination diet then note any increase in symptoms or outbreaks as you re-introduce foods one at a time.
I have dealt with eczema and skin hypersensitivity my entire life and am now treating my daughter for the same things. Good luck!