I have a div (.content) that has a transform-origin: top left and I need to center it. The thing is, I can only modify CSS of its wrapper (.wrap), but not of the actual div. I've, of course, tried margin: 0 auto, but that's not working. And neither is position: absolute (with left and right set as 0), though if I can avoid using absolute, even better.
Is there any way I can center this div?
This is the outline of my HTML and CSS:
/* The part of CSS that I can't modify */
.content {
height: 350px;
width: 350px;
background-color: darkblue;
-webkit-transform: scale(0.7);
-moz-transform: scale(0.7);
-o-transform: scale(0.7);
transform: scale(0.7);
-webkit-transform-origin: top left;
-moz-transform-origin: top left;
transform-origin: top left;
}
/* The part of CSS that I can modify */
.wrap {
margin: 0 auto;
}
<div class="wrap">
<div class="content"></div>
</div>
Thanks!