Currently, my button appears to increase in size during the transition. I am aiming for the arrow to move from left to right without the actual button resizing. Check out the code on JSFiddle.
I attempted using max-width: 100%
on the button but found that this solution resulted in an unappealing transition.
Here is a snippet of the HTML:
<a href="" class="btn btn-primary">
Dont make me larger
<i class="arrow-right"></i>
</a>
And the corresponding CSS:
.arrow-right {
/* STYLING */
margin-left: 10px;
border: solid #fff;
border-radius: 1px;
border-width: 0 3px 3px 0;
display: inline-block;
padding: 3px;
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
/* TRANSITION */
-webkit-transition: 0.5s; /* Safari */
transition: 0.5s;
}
.btn-primary:hover .arrow-right {
margin-left: 15px;
}