I'm trying to make different classes for alignment.
I want to be able to combine it like class="left bottom"
using the transform:translate
property.
The problem is that the property is being overridden by each other.
If you have a look at my fiddle and open up the debugger you will notice that translateX(50%)
has been overridden by translateY(25%)
. Shouldn't they be combined like translate(50%,25%)
?
.container {
background: gray;
height: 100px;
width: 100%;
}
.left {
transform: translateX(50%);
}
.bottom {
transform: translateY(25%);
}
<div class="container">
<div class="left bottom">
I should be aligned
</div>
</div>