Why use に in 元気にしてたか？


I learned that the particle に is meant to mark the place in a phrase, similar
to _in, on and at_. But today I was reading Yotsubato and I came across this
phrase **元気にしてたか** and obviously this rule doesn't apply to 元気.

It didn't stop me to understand the conversation (at least I think so), I
presume it meant something like:

> How you doing? Good?

Am I wrong in this? Why use the particle に in this phrase?




元気 is a na adjective

To describe the verb していた（する), we add に to make 元気an adverb.




元気 is a na adjective

To describe the verb していた（する), we add に to make 元気an adverb.

