Foros del Web » Creando para Internet » HTML »

doctype y css

Estas en el tema de doctype y css en el foro de HTML en Foros del Web. muy buenas... espero me puedan ayudar con un problemita que tengo. resulta que estoy haciendo un formulario con html y css, pero al agregar <!DOCTYPE ...
  #1 (permalink)  
Antiguo 29/01/2011, 21:07
 
Fecha de Ingreso: octubre-2008
Ubicación: Santiago
Mensajes: 25
Antigüedad: 15 años, 5 meses
Puntos: 2
doctype y css

muy buenas...

espero me puedan ayudar con un problemita que tengo.

resulta que estoy haciendo un formulario con html y css,
pero al agregar <!DOCTYPE html> u otro doctype al archivo html no me carga el css por lo que el formulario se ve horrible

alguna ayuda o consejo seran bien recibidos


gracias y saludos.
  #2 (permalink)  
Antiguo 29/01/2011, 22:13
Avatar de Kurozaki  
Fecha de Ingreso: diciembre-2010
Ubicación: Con mi Zanpakutou (Colima, MEX).
Mensajes: 175
Antigüedad: 13 años, 3 meses
Puntos: 9
Respuesta: doctype y css

si poneis tu codigo HTML, te podriamos ayudar mejor
__________________
Diseñador y Desarrollador web :)
  #3 (permalink)  
Antiguo 29/01/2011, 22:44
 
Fecha de Ingreso: octubre-2008
Ubicación: Santiago
Mensajes: 25
Antigüedad: 15 años, 5 meses
Puntos: 2
Respuesta: doctype y css

Este codigo funciona perfecto salvo por un td:hover que no funciona porque creo que hay que agregarle el doctype

Código HTML:
Ver original
  1.     <head>
  2.         <link rel="stylesheet" href="css/login-style.css" />
  3.         <title>LOGIN TO YOUR ACCOUNT</title>
  4.     </head>
  5.     <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  6.         <form action="" method="post" autocomplete="off">
  7.             <table id="login-form-contain">
  8.                 <tr>
  9.                     <td>
  10.                         <table id="login-form" width="438" height="278" border="0" cellpadding="0" cellspacing="0" align="center">
  11.                             <tr>
  12.                                 <td rowspan="6">
  13.                                     <img src="img/asdsad_01.jpg" width="20" height="278" alt="" /></td>
  14.                                 <td colspan="3">
  15.                                     <img src="img/asdsad_02.jpg" width="398" height="87" alt="" /></td>
  16.                                 <td rowspan="6">
  17.                                     <img src="img/asdsad_03.jpg" width="20" height="278" alt="" /></td>
  18.                             </tr>
  19.                             <tr>
  20.                                 <td colspan="3" class="login-form-input-username" valign="top">
  21.                                     <!--<img src="img/asdsad_04.jpg" alt="">-->
  22.                                     <input type="text" name="username" class="username" />
  23.                                 </td>
  24.                             </tr>
  25.                             <tr>
  26.                                 <td colspan="3">
  27.                                     <img src="img/asdsad_05.jpg" width="398" height="23" alt="" /></td>
  28.                             </tr>
  29.                             <tr>
  30.                                 <td colspan="3" class="login-form-input-password" valign="top">
  31.                                     <!--<img src="img/asdsad_06.jpg" width="398" height="51" alt="">-->
  32.                                     <input type="password" name="password" class="password" />
  33.                                 </td>
  34.                             </tr>
  35.                             <tr>
  36.                                 <td>
  37.                                     <img src="img/asdsad_07.jpg" width="38" height="45" alt="" /></td>
  38.                                 <td>
  39.                                     <img src="img/asdsad_08.jpg" width="163" height="45" alt="" /></td>
  40.                                 <td>
  41.                                     <img src="img/asdsad_09.jpg" width="197" height="45" alt="" /></td>
  42.                             </tr>
  43.                             <tr>
  44.                                 <td colspan="3">
  45.                                     <img src="img/asdsad_10.jpg" width="398" height="26" alt="" /></td>
  46.                             </tr>
  47.                         </table>
  48.                     </td>
  49.                 </tr>
  50.             </table>
  51.         </form>
  52.     </body>
  53. </html>

entonces le agrego un doctype como este:
<!DOCTYPE html>

y se deforma porque no toma las propiedades css
  #4 (permalink)  
Antiguo 29/01/2011, 22:53
Avatar de Kurozaki  
Fecha de Ingreso: diciembre-2010
Ubicación: Con mi Zanpakutou (Colima, MEX).
Mensajes: 175
Antigüedad: 13 años, 3 meses
Puntos: 9
Respuesta: doctype y css

agregale un doctype adecuado.

<!DOCTYPE html PUBLIC " -//W3C//DTD XHTML 1.0 Transitional", etc etc.....

y en el link rel agregale.

type="text/css"

Saludos...
__________________
Diseñador y Desarrollador web :)
  #5 (permalink)  
Antiguo 30/01/2011, 04:29
Avatar de jomaruro
Colaborador
 
Fecha de Ingreso: junio-2002
Ubicación: Naboo
Mensajes: 5.442
Antigüedad: 21 años, 9 meses
Puntos: 361
Respuesta: doctype y css

Hola:

El DOCTYPE debes incluirselo siempre es la manera de indicar al navegador como debe interpretar el HTML.

Saludos.

  #6 (permalink)  
Antiguo 30/01/2011, 08:28
 
Fecha de Ingreso: octubre-2008
Ubicación: Santiago
Mensajes: 25
Antigüedad: 15 años, 5 meses
Puntos: 2
Respuesta: doctype y css

bueno gracias a todos por responder, acabo de solucionar el problema y se debia a que el servidor local que trae incluido NuSphere PhpED no lo interpretaba bien, asi que lo acabo de configurar con wamp server y todo ok

Etiquetas: css, doctype
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 14:12.