Image Centering

I have 3 images; a background image, the site image and a third image. My third image will not center. I’m sure the problem is in the html part of it (not in the CSS) as the image appears but just won’t center across the page. Can you help me?

<img src=“images/John_Hopkins_Univ.gif” align=“center” />

Here’s my CSS just in case:
/* ==== university logo ==== */
img {
image-padding-left: 239px;
image-height: 125px;

if you use text-align:center, all the content from that container will be centered. If you don’t want this to happen try use a different approach: margin: 0 auto for your image.

OMG Thank you so much; you’re a life saver. The was the last piece of the puzzle! Now I get to convert 150 pages to CSS.


Align attribute is deprecated, so you may not use it anymore. I don’t understand what do you mean by image-style=“center”; First, there is no css property like image-style… same goes for image-padding-left and image-height. And you have to use colon instead of = when separating the property and value.

Below can center align an image:

.centerimage {
text-align: center;
<div class="centerimage"><img src="images/John_Hopkins_Univ.gif" align="center" /></div>