Foros del Web » Creando para Internet » CSS »

Ayuda con css sencillo

Estas en el tema de Ayuda con css sencillo en el foro de CSS en Foros del Web. Hola necesito ayuda. Estoy intentando aprender css (ya se xhtml) y estoy con el box model. tengo este codigo xhtml: Código: <!DOCTYPE html PUBLIC "-//W3C//DTD ...
  #1 (permalink)  
Antiguo 15/11/2010, 14:51
Avatar de ofmjuanabascal  
Fecha de Ingreso: noviembre-2010
Ubicación: Cantabria
Mensajes: 17
Antigüedad: 13 años, 5 meses
Puntos: 0
Ayuda con css sencillo

Hola necesito ayuda. Estoy intentando aprender css (ya se xhtml) y estoy con el box model. tengo este codigo xhtml:
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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Mi Website</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="cabecera">
<h1 class="logo">Logotipo</h1>
<form action="#" class="buscador">
<input type="text" name="buscar" value="buscar..." />
</form>
</div>
</body>
</html>
y este codigo css:
Código:
#cabecera { clear: both; }

#cabecera .logo { float: left; }
#cabecera .buscador { float: right; }


#cabecera{
padding: 1em
}
Pero la cabecera no me queda bien...

Me podrían decir donde cometo el error??
  #2 (permalink)  
Antiguo 15/11/2010, 15:09
Avatar de DragonX
Colaborador
 
Fecha de Ingreso: mayo-2002
Ubicación: Funkyland
Mensajes: 8.433
Antigüedad: 21 años, 10 meses
Puntos: 177
Respuesta: Ayuda con css sencillo

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Mi Website</title>
  6. <link rel="stylesheet" type="text/css" href="style.css" />
  7. #cabecera {overflow:hidden;}
  8.  
  9. #cabecera .logo { float: left;margin:0; }
  10. #cabecera .buscador { float: right; }
  11.  
  12.  
  13. #cabecera{
  14. padding: 1em
  15. }
  16. </head>
  17. <div id="cabecera">
  18. <h1 class="logo">Logotipo</h1>
  19. <form action="#" class="buscador">
  20. <input type="text" name="buscar" value="buscar..." />
  21. </form>
  22. </div>
  23. </body>
  24. </html>

Slds.-
__________________
Desarrollos dosLotos
Calendario Maya, Meditación, Osho
  #3 (permalink)  
Antiguo 16/11/2010, 08:25
Avatar de ofmjuanabascal  
Fecha de Ingreso: noviembre-2010
Ubicación: Cantabria
Mensajes: 17
Antigüedad: 13 años, 5 meses
Puntos: 0
Respuesta: Ayuda con css sencillo

Muchas gracias me funciono! :)

Etiquetas: sencillo
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 13:49.