Centering an image in a browser regardless of browser / screen size?
Posted on 2010-08-27
Probably a very simple thing to fix but nonetheless I have not really come up with a solution that addresses this problem.
Basically, I have a webpage that features a background template (a JPEG File). For example, look at the experts exchange site. Imagine the white part being the background template. The grey on the left and right sides changes in width depending on your browser (if it's maximized or not) and your screen width, but regardless, the middle white part remains centered and balanced. It doesn't stretch and distort.
So I guess what I am looking for is a code example in HTML to show me how to do this?