Voor mijn mijn uploads maak ik gebruik van een custom upload button door boven op mijn custom knop een doorzichtige <input type="file"> te plaatsen. Nu wil ik graag omwille van consistentie de cursor in een handje laten veranderen zoals bij alle andere buttons op de site. Helaas ondersteund input dit niet. is dit nog met css op te lossen?
HTML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
| <style> html,body { padding: 0; margin: 0; font-family: Arial; font-size: 12px; } #file { position: relative; margin-left: -154px; -moz-opacity:0 ; filter:alpha(opacity: 0); opacity: 0; z-index: 2; top: -1px; cursor: pointer; } #test { position: absolute; z-index: 1; top: 0; left: 0; color: white; background-color: #747474; padding: 2px 10px 2px 10px; margin: 0; border: 1px solid #747474; cursor: help; } a { color: white; text-decoration: none; cursor: pointer; } a:hover { color: white; text-decoration: underline; cursor: pointer; } </style> <form name="iform" action="" method="post" enctype="multipart/form-data"> <input id="file" type="file" name="image" onChange="upload()" /> <input type="hidden" name="imageupload" value="true"> </form> <div id="test"><span><a href="#" class="knop">Change</a></span></div> </body> </html> |