Ver Mensaje Individual
  #6 (permalink)  
Antiguo 21/08/2009, 05:48
kseso?
Colaborador
 
Fecha de Ingreso: junio-2007
Mensajes: 5.798
Antigüedad: 16 años, 10 meses
Puntos: 539
Respuesta: Problema con float y clear

¡Anda, co**! lo pillé "alverres"
¿Habré acertado ahora:
Código html:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es-es">
  3. <title>kseso? jugando con css</title>
  4. <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
  5. <style type="text/css">
  6. * {margin: 0; padding: 0; border: 0; outline: none; position: relative;}
  7. /*#form1{
  8. margin:10px auto auto;
  9. padding:5px 250px 5px 10px;
  10. width:280px;
  11. overflow: hidden;
  12.  
  13. }*/
  14. input {float: left;}
  15. form .moreUploads {float: left;}
  16. form a {float: left;, margin-bottom: 5px;}
  17. .corte {display:block; float: none; clear: both;}
  18. <script type="text/javascript">
  19. var upload_number = 2;
  20. function addNode() {
  21.     var d = document.createElement("div");
  22.     var file = document.createElement("input");
  23.     file.setAttribute("type", "file");
  24.     file.setAttribute("name", "attachment"+upload_number);
  25.     d.appendChild(file);
  26.     document.getElementById("moreUploads").appendChild(d);
  27.     upload_number++;
  28. }
  29.  
  30. function delNode(){
  31.  
  32. }
  33. //-->
  34. </head>
  35. <h1>DOM Insert and Append</h1>
  36. <form id="form1" name="form1" action="" method="post" enctype="multipart/form-data" >
  37.  <input type="file" name="attachment" id="attachment" onchange="document.getElementById('moreUploadsLink').style.display = 'block';" />
  38. <div id="moreUploadsLink" style="float:left;">
  39. <a href="javascript:addNode();">Agregar otro archivo</a>
  40. </div>
  41. <div id="moreUploads">
  42. </div>
  43. <div class="corte"></div>
  44. <input type="submit" />
  45. </form>
  46. </body>
  47. </html>
Pero lo que no tenemos en el código que pusiste al abrir el tema es el "eliminar archivo".
Ya dirás, 0le0
__________________
Por una web con mucho estilo
+++ CUENTA ABANDONADA. ¿la quieres? +++