image center in a code example Example: center an image .classNameOfImage { display: block; margin-left: auto; margin-right: auto; }