I am rotating an image using a CSS transform like this...
https://jsfiddle.net/7ed1aqrt/
.content1{background:teal;}
.imagecontainer{text-align:center;background:wheat;width:100%;}
img{transform: rotate(90deg);}
.content2{background:pink;}
<div class ="content1">Content 1</div>
<div class ="imagecontainer">
<img src="https://dummyimage.com/300x200/000/fff">
</div>
<div class ="content2">Content 2</div>
But the rotated image is breaking out of it's container and overlapping the divs above and below it.
Is there a way to stop this from happening?