I am trying to move one element next to another on my site.
Basically, I want the cart button to the right of quantity. float: right
takes the button to the right place horizontally. But I also want to move them adjacent to each other.
.quantity
is a block element (it takes the full row), so you can use float
like this:
.quantity {float: left;}
Don't forget to clear:both;
after if your floated elements start dropping out of their parent element (and they will unless there's a non-floated element that's higher than all of them).
You can set the container of the number choosing element to
float: left;
and the button to
display: inline;
http://jsfiddle.net/v7ryN/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With