The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS Centering Images help Re: CSS Centering Images help



.img {
margin-left: auto;
margin-right: auto;
width: 8em;


.img {
text-align: center;

Then, if you want to adjust their vertical alignment, you can do so with the vertical-align property:

.img img {
vertical-align: middle; /* bottom, top, or any of the other options */