Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/04/2009, 16:27
juandedios
 
Fecha de Ingreso: mayo-2003
Ubicación: Lima
Mensajes: 967
Antigüedad: 21 años
Puntos: 8
Respuesta: Que un div crezca de acuerdo a su contenido

EL HTML:
Código html:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <title>Documento sin título</title>
  5. <link href="style/stilos.css" rel="stylesheet" type="text/css" />
  6. </head>
  7.  
  8. <div id="pagina">
  9.     ...
  10.     <div id="cuerpo">
  11.         <div id="izquierda"></div>
  12.         <div id="centro">
  13.             <div id="formregistro" style="margin-top: 50px">
  14.                 <span class="titulopopup">Formulario de registro</span>
  15.                 <p>
  16.                     Ingrese sus datos en el formulario que sigue abajo. Todos los campos son obligatorios.
  17.                 </p>
  18.                 <fieldset>
  19.                     <legend>Datos de acceso</legend>
  20.                     <table width="100%" cellpadding="2" cellspacing="2">
  21.                         <tr>
  22.                             <td width="150">
  23.                                 <label for="regemail" id="label_regemail">Correo electr&oacute;nico</label>
  24.                             </td>
  25.                             <td id="ver_regemail">
  26.                                 <input type="text" id="regemail" size="40" />
  27.                                 <strong><div id="error_regemail"></div></strong>
  28.                             </td>
  29.                         </tr>
  30.                         <tr>
  31.                             <td>
  32.                                 <label for="regusuario" id="label_regusuario">Nickname</label>
  33.                             </td>
  34.                             <td id="ver_regusuario">
  35.                                 <input type="text" id="regusuario" size="40" />
  36.                                 <strong><div id="error_regusuario"></div></strong>
  37.                             </td>
  38.                         </tr>
  39.                         <tr>
  40.                             <td>
  41.                                 <label for="regclave" id="label_regclave">Contrase&ntilde;a</label>
  42.                             </td>
  43.                             <td id="ver_regclave">
  44.                                 <input type="password" id="regclave" size="40" />
  45.                                 <strong><div id="error_regclave"></div></strong>
  46.                             </td>
  47.                         </tr>
  48.                         <tr>
  49.                             <td>
  50.                                 <label for="regrclave" id="label_regrclave">Repita la contrase&ntilde;a</label>
  51.                             </td>
  52.                             <td id="ver_regrclave">
  53.                                 <input type="password" id="regrclave" size="40" />
  54.                                 <strong><div id="error_regrclave"></div></strong>
  55.                             </td>
  56.                         </tr>
  57.                     </table>
  58.                 </fieldset>
  59.                
  60.                 <fieldset>
  61.                     <legend>Datos generales</legend>
  62.                     <table width="100%" cellpadding="2" cellspacing="2">
  63.                         <tr>
  64.                             <td width="150">
  65.                                 <label for="regnombre" id="label_regnombre">Nombres</label>
  66.                             </td>
  67.                             <td id="ver_regnombre">
  68.                                 <input type="text" id="regnombre" value="" size="40" />
  69.                                 <strong><div id="error_regnombre"></div></strong>
  70.                             </td>
  71.                         </tr>
  72.                         <tr>
  73.                             <td>
  74.                                 <label for="regapellido" id="label_regapellido">Apellidos</label>
  75.                             </td>
  76.                             <td id="ver_regapellido">
  77.                                 <input type="text" id="regapellido" value="" size="40" />
  78.                                 <strong><div id="error_regapellido"></div></strong>
  79.                             </td>
  80.                         </tr>
  81.                         <tr>
  82.                             <td>
  83.                                 <label for="regnacimiento" id="label_regnacimiento">Fecha de nacimiento</label>
  84.                             </td>
  85.                             <td id="ver_regnacimiento">
  86.                                 <select id="dia">
  87.                                     <option value="" selected>D&iacute;a</option>
  88.                                     <?php
  89.                                     for ($d = 1; $d <= 31; $d++) {
  90.                                         echo "<option value='".$d."'>".$d."</option>";
  91.                                     }
  92.                                     ?>
  93.                                 </select>
  94.                                 <select id="mes">
  95.                                     <option value="" selected>Mes</option>
  96.                                     <?php
  97.                                     for ($m = 1; $m <= 12; $m++) {
  98.                                         echo "<option value='".$m."'>".$meses[$m]."</option>";
  99.                                     }
  100.                                     ?>
  101.                                 </select>
  102.                                 <select id="ano">
  103.                                     <option value="" selected>A&ntilde;o</option>
  104.                                     <?php
  105.                                     for ($a = 0; $a < count($anos); $a++) {
  106.                                         echo "<option value='".$anos[$a]."'>".$anos[$a]."</option>";
  107.                                     }
  108.                                     ?>
  109.                                 </select>
  110.                                 <strong><div id="error_regnacimiento"></div></strong>
  111.                             </td>
  112.                         </tr>
  113.                         <tr>
  114.                             <td>
  115.                                 <label for="regpais" id="label_regpais">Fecha de nacimiento</label>
  116.                             </td>
  117.                             <td id="ver_regpais">
  118.                                 <select id="regpais" style="width: 266px;">
  119.                                     <option value="" selected>Pa&iacute;s</option>
  120.                                 </select>
  121.                                 <strong><div id="error_regpais"></div></strong>
  122.                             </td>
  123.                         </tr>
  124.                         <tr>
  125.                             <td>
  126.                                 <label for="regciudad" id="label_regciudad">Ciudad</label>
  127.                             </td>
  128.                             <td id="ver_regciudad">
  129.                                 <input type="text" id="regciudad" value="" size="40" />
  130.                                 <strong><div id="error_regciudad"></div></strong>
  131.                             </td>
  132.                         </tr>
  133.                     </table>
  134.                 </fieldset>
  135.                 <fieldset>
  136.                     <legend>Tarjeta de cr&eacute;dito</legend>
  137.                     <table width="100%" cellpadding="2" cellspacing="2">
  138.                         <tr>
  139.                             <td colspan="2">
  140.                                 <span style="font-weight:normal">Ingrese los datos de su tarjeta de cr&eacute;dito para efectuar los pagos de su membres&iacute;a de forma autom&aacute;tica, as&iacute; como las compras de los productos.</span>
  141.                             </td>
  142.                         </tr>
  143.                         <tr>
  144.                             <td colspan="2">&nbsp;</td>
  145.                         </tr>
  146.                         <tr>
  147.                             <td width="150">
  148.                                 <label for="regtarjeta" id="label_regtarjeta">Tipo de tarjeta</label>
  149.                             </td>
  150.                             <td id="ver_regtarjeta">
  151.                                 <input type="text" id="regtarjeta" value="" size="50" />
  152.                                 <strong><div id="error_regtarjeta"></div></strong>
  153.                             </td>
  154.                         </tr>
  155.                         <tr>
  156.                             <td>
  157.                                 <label for="regnumero" id="label_regnumero">N&uacute;mero de tarjeta</label>
  158.                             </td>
  159.                             <td id="ver_regnumero">
  160.                                 <input type="text" id="regnumero" value="" size="50" />
  161.                                 <strong><div id="error_regnumero"></div></strong>
  162.                             </td>
  163.                         </tr>
  164.                         <tr>
  165.                             <td>
  166.                                 <label for="regnombretarjeta" id="label_regnombretarjeta">Nombre en tarjeta</label>
  167.                             </td>
  168.                             <td id="ver_regnumero">
  169.                                 <input type="text" id="regnombretarjeta" value="" size="50" />
  170.                                 <strong><div id="error_regnombretarjeta"></div></strong>
  171.                             </td>
  172.                         </tr>
  173.                         <tr>
  174.                             <td>
  175.                                 <label for="regdirecciontarjeta" id="label_regdirecciontarjeta">Direcci&oacute; en tarjeta</label>
  176.                             </td>
  177.                             <td id="ver_regdirecciontarjeta">
  178.                                 <input type="text" id="regdirecciontarjeta" value="" size="50" />
  179.                                 <strong><div id="error_regdirecciontarjeta"></div></strong>
  180.                             </td>
  181.                         </tr>
  182.                     </table>
  183.                 </fieldset>
  184.                 <br />
  185.                 <table width="100%" cellpadding="2" cellspacing="2">
  186.                     <tr>
  187.                         <td align="center">
  188.                             <input type="image" id="btnregistrar" src="img/btnRegistrese.gif" />
  189.                         </td>
  190.                     </tr>
  191.                 </table>
  192.             </div>
  193.             <div class="corte"></div>
  194.         </div>
  195.         ....
  196. </div>
  197. </body>
  198. </html>
__________________
El aprendiz.