add styling of the file input hack

This commit is contained in:
Damien Churchill 2008-11-11 16:32:01 +00:00
parent bc3a7bd057
commit fb1a62a9f8
2 changed files with 30 additions and 1 deletions

View File

@ -4,7 +4,14 @@
</head> </head>
<body style="background: none;"> <body style="background: none;">
<form method="post" action="/json/upload" enctype="multipart/form-data"> <form method="post" action="/json/upload" enctype="multipart/form-data">
<label>$_('File'):</label><div id="torrentFileDiv"><input type="file" name="torrentFile" /></div><br/> <label>$_('File'):</label>
<div class="fileInputs">
<input type="file" name="torrentFile" class="file" />
<div class="fakeFile">
<input />
<button>$_('Browse')</button>
</div>
</div><br/>
<button class="ok">$_('Ok')</button><button class="cancel">$_('Cancel')</button> <button class="ok">$_('Ok')</button><button class="cancel">$_('Cancel')</button>
</form> </form>
</body> </body>

View File

@ -25,6 +25,28 @@ form label {
float: left; float: left;
} }
div.fileInputs {
position: relative;
}
div.fakeFile {
position: absolute;
top: 0px;
left: 0px;
z-index: 1;
}
form input.file {
position: absolute;
top: 0px;
left: 0px;
text-align: left;
-moz-opacity: 0;
opacity: 0;
filter: alpha(opacity: 0);
z-index: 2;
}
form input, form select { form input, form select {
float: left; float: left;
margin-right: 5px; margin-right: 5px;