Best Way to Center Two Adjacent Images?

I’ve got two side-by-side images I need to be centered in their container. I don’t know any way of doing this that doesn’t seem like a hack.

need something like this (x’s are the two images): |----xx----|

In order to help you with your problem, we need to see the code you’re using. Please provide a link to the site, or if you can’t do that, paste the HTML and CSS for the page here. Wrap

 tags round it (you can "Go Advanced" and use the # button to do this), to make sure it's properly formatted and easy to read.

Is there anything else in the container with them? If not, how about {text-align:center;} on the container? If there is, wrap them in a <div> with {text-align:center;}.

Thanks, that gets the job done. I wouldn’t have thought to use “text” align like that. Is that ok/normal practice or is it a hack? Cause… well, you know… it’s not text :lol:.

If the images are inline (ie, not positioned or floated) then they behave just like text, so you can align them, underline them and so on. Remember that you could just as easily have had text mixed in with the images, rather than just two images on their own, and you wouldn’t think twice about using text-align then.

I see, thanks.