Jump to content

Centering an image in a DIV...


Jim R

Recommended Posts

I think I figured it out.  It may have been a max-size issue with another image.

 

Margin:auto doesn't work on inline elements such as images. In stead, you could use text-align:center, declared for the parent element.

 

For more information, see How to Center in CSS.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.