Normally I would use this line within the inner div style to force inner div to centralized within outer div:
Code: Select all
#inner_div{width: some fixed number; margin-left: auto ; margin-right: auto ;}But when the height exceeds the width, then arises the need for the image to be centralized and apparently the max-width attribute prevents the image to be centralized.
So I figured out that the solution would be to shrink the outer div to assume the width of inner div, then centralize outter div within its own container div. I'm not sure how shrinking to fit can be accomplished. Any ideas? Or any other smart ideas to fix the original problem?