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