Centring an HTML element relative to its parent when its width is greater than its parent. [closed]
- by casr
I mocked up my intended outcome. So the blue element is the main content of the website and the yellow element represents something like a diagram or an image that has a greater width than the blue element.
Ideally, I would like a purely CSS solution that is able to deal with various sizes of images. I have tried various things but have failed so…