The official way to do it is to give your block level element a width in pixels and set its left and right margins to auto. But this won't work in IE, so you have to hack it a little.
Rahul Naskar has years of experience writing news and features related to Android, phones, and apps. Outside the tech world, he follows global events and developments shaping the world of geopolitics.