Fix chaging margins by translating the element. Closes #12