The only way to have an upload button that looks and functions purely as a button is as follows:
- Hide the file input button by setting opacity to 0.
- Put the button in a div with "overflow: hidden",
- Set the button to a large size and absolute position to top-right (this also means that the parent div has to be a positioned element).
- Have a regular image/button or a background image in the same place to serve as the image for the button.
- Only the button of the file input element is clickable. The rest of it has overflowed to the left into the hidden area of the parent div. (This fixes a mouse styling issue).
- The button is not visible due to opacity. User only sees the image drawn on top of it.
However, it is not possible to style the mouse cursor to the "hand" pointer.
References:
References:
No comments:
Post a Comment