I’m looking to create a “sliding door” effect using a button tag (because it’s for a form’s submit button), but it’s not working. Check this fiddle: http://jsfiddle.net/gf8bV/14/
In the fiddle you see that, with the same code, it works for the div but not for the button. Why is that? Any solution?
I’m not sure why margins don’t work the same inside buttons, but if you don’t want to add extra markup you can achieve the same effect with position instead of margin, by setting the button to position: relative, the divs to absolute and then shifting them both up on hover.
http://jsfiddle.net/moopet/gdyys/1/