Centering DIV with overflow (hidden)

Hi. I am finding trouble trying to center images inside a div so that when expanding the browser they stay center with overflow hidden.

1740px DIV that is set to overflow the page via a parent DIV. What happens is that at smaller scales the image is justified left of the browser. I have tried using a flex layout, adding auto margins, etc. Still cant figure out why I cant center the DIV.

Any help or guidance would be greatly appreciated. Thanks in advance.

Here is my site Read-Only:

Is it Div Block 46 You are talking about? Ad some video (, I don’t understand the issue

Sorry, here is some clarification:

DIV: gifsection

Here its viewed at a large screen resolution. Its centered, its fine.

Here its viewed at a desktop resolution. In this case the image on the left should be off the screen. The div goes beyond the browser screen here so im not sure why its not centered here.

Anyone have any ideas? Still stuck on this one.

@Jeremy_Stewart you’re almost there. The issue is that that unlike the section above it, the section you are having issues with is flexing horizontally to accommodate its children’s position. Just wrap that section in a wrapper that is flexing like the one for the video above it (vertically and centered) and you will be all set.

Don’t forget to set your max width for the new wrapper smaller than the width of the section it contains. I just duplicated the “case” div and emptied it out and put your “gif section” in an it worked like a charm

Awesome. I did just that. I had to also remove the auto margins on gifsection for it to work.

Thanks for your help!

:slight_smile: no problem!