center inside a with CSS

Giving the div text-align: center should work. (You may have to add align='center' as a property for it to work in IE6, though.) Note: As pointed out by @streetpc, this method will not work properly if the image is wider than the container.

Alternatively, you could also have the image as a background image:

background-image: url(url);
background-position: center top;

Leave a Comment