Center an image across all devices

How do I center an image across all devices? Right now, margin is only in pixels, how could I specify margin in % so when the device dimensions change, the image will still be centered?
1 person has
this question
This topic is no longer open for comments or replies.