Ver Mensaje Individual
  #6 (permalink)  
Antiguo 27/08/2010, 07:38
Avatar de cristian_cena
cristian_cena
Colaborador
 
Fecha de Ingreso: junio-2009
Mensajes: 2.244
Antigüedad: 14 años, 10 meses
Puntos: 269
Respuesta: input file, arreglar fallos en el estilo y problema de opacidad con opera

Es cierto, no se ve en opera oops. yo lo veo bien en ie6,7y8.

Esto anda en opera (incluye las imagenes que te pase en el rar en la raiz junto al html que guardes con este codigo):

Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Styling File Inputs </title>
<style type="text/css">
.upload {
position: relative;
width: 80px;
height: 24px;
overflow:hidden;
background:url(btn-choose-file.gif);
clip:rect(0px, 80px, 24px, 0px );
}

.upload input {
position: absolute;
left: auto;
right: 0px;
top: 0px;
margin:0;
padding:0;
filter: Alpha(Opacity=0);
-moz-opacity: 0;
opacity: 0;
}
.upload input:hover{background:;}
</style>
<script type="text/javascript">
function cambia(id){
document.getElementById(id).style.background="url(hover.gif)";
}
function cambia2(id){
document.getElementById(id).style.background="url(btn-choose-file.gif)";
}
</script>
</head>
<body>
<div id="hola" class="upload"> <input name="upload" type="file" onmousemove="cambia('hola');" onmouseout="cambia2('hola');"/></div>
</body>
</html>
Espero que lo puedas resolver, luego cuentame como te fue. un saludo

p-d: notaras que ya no uso el script que te pase en el rar, sino un javascript mucho mas sencillo.

para capturar el nombre del archivo que subirá el usuario y mostrarlo en pantalla ya veo que se me ocurre y en que te puedo ayudar.

Última edición por cristian_cena; 27/08/2010 a las 07:45