Foros del Web » Creando para Internet » CSS »

Problema con border

Estas en el tema de Problema con border en el foro de CSS en Foros del Web. Este es el html antes de poner un border: @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código HTML: Ver original <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html ...
  #1 (permalink)  
Antiguo 28/07/2011, 13:10
Avatar de thefranex3  
Fecha de Ingreso: junio-2011
Mensajes: 21
Antigüedad: 12 años, 9 meses
Puntos: 0
Problema con border

Este es el html antes de poner un border:

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 rel="stylesheet" href="data/estilo.css" type="text/css">
  6. </head>
  7.  
  8. <div id="Cabecera">
  9. </div>
  10. </body>
  11. </html>

y el css

Código CSS:
Ver original
  1. @charset "utf-8";
  2. /* CSS Document */
  3.  
  4. #Cabecera {
  5.     position:absolute;
  6.     background-color:#4c89c8;
  7.     background-image:url(fondo.png);
  8.     background-repeat:repeat;
  9.     width:1280px;
  10.     height:200px;
  11.     top:0px;
  12.     left:0px;
  13.     right:0px;
  14. }

Para introducir los bordes solo uso css, de manera que me queda así:

Código CSS:
Ver original
  1. @charset "utf-8";
  2. /* CSS Document */
  3.  
  4. #Cabecera {
  5.     position:absolute;
  6.     background-color:#4c89c8;
  7.     background-image:url(fondo.png);
  8.     background-repeat:repeat;
  9.     width:1280px;
  10.     border-top:5px;
  11.     border-color:#999;
  12.     height:200px;
  13.     top:5px;
  14.     left:0px;
  15.     right:0px;
  16. }

Y me sale lo que debería de ser el borde en blanco... ¿Por que?
  #2 (permalink)  
Antiguo 28/07/2011, 13:20
Avatar de ArturoGallegos
Moderador
 
Fecha de Ingreso: febrero-2008
Ubicación: Morelia, México
Mensajes: 6.774
Antigüedad: 16 años, 1 mes
Puntos: 1146
Respuesta: Problema con border

te falta border-top-style
Código CSS:
Ver original
  1. #Cabecera {
  2.     position:absolute;
  3.     background-color:#4c89c8;
  4.     background-image:url(fondo.png);
  5.     background-repeat:repeat;
  6.     width:1280px;
  7.     border-top:5px;
  8.     border-top-color:#999;
  9.     border-top-style: solid;
  10.     height:200px;
  11.     top:5px;
  12.     left:0px;
  13.     right:0px;
  14. }
o bien utiliza la version abreviada
Código CSS:
Ver original
  1. #Cabecera {
  2.     position:absolute;
  3.     background-color:#4c89c8;
  4.     background-image:url(fondo.png);
  5.     background-repeat:repeat;
  6.     width:1280px;
  7.     border-top:5px #999 solid;
  8.     height:200px;
  9.     top:5px;
  10.     left:0px;
  11.     right:0px;
  12. }

Etiquetas: border, bordes
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 09:09.