Foros del Web » Creando para Internet » CSS »

[Ayuda] Forzar a que haya 20px de espacio de margen

Estas en el tema de [Ayuda] Forzar a que haya 20px de espacio de margen en el foro de CSS en Foros del Web. Bueno, antes que nada, os dejo el código: Cita: <!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" /> ...
  #1 (permalink)  
Antiguo 24/02/2011, 16:37
Avatar de kiM-  
Fecha de Ingreso: mayo-2008
Mensajes: 191
Antigüedad: 15 años, 10 meses
Puntos: 2
[Ayuda] Forzar a que haya 20px de espacio de margen

Bueno, antes que nada, os dejo el código:

Cita:
<!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>Documento sin título</title>
<style type="text/css">
body {
margin-top: 0px;
margin-bottom: 0px;
background-image: url(webs/bg.png);
background-repeat: no-repeat;
}
#contenedor {
width: 960px;
border-right-width: 1px;
border-left-width: 1px;
border-right-style: dashed;
border-left-style: dashed;
border-right-color: #06F;
border-left-color: #06F;
margin-top: 0px;
margin-bottom: 0px;
background-color: #FFF;
margin-right: auto;
margin-left: auto;
}
#headnews {
width: 744px;
}
.headnews {
width: 744px;
}
.globalnews {
width: 744px;
}
.headnews {
width: 744px;
}
.bgnews {
width: 744px;
background-image: url(webs/web_06.gif);
}
.contentnews {
font-family: Verdana, Geneva, sans-serif;
font-size: 10px;
font-style: normal;
font-weight: bold;
color: #FFF;
margin-left:30px;
margin-top:0px;
margin-bottom:0px;
margin-right:15px;
}
#globalleft {
width: 216px;
}
#bgleft {
background-image: url(webs/web_07.png);
width: 216px;
}
#globalfooter {
width: 216px;
}
#menucontent {
font-family: Verdana, Geneva, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: bold;
color: #FFF;
text-decoration: line-through;
margin-top: 0px;
margin-right: 25px;
margin-bottom: 0px;
margin-left: 15px;
text-shadow: 0.1em 0.1em #333;
}
#header {
width: 960px;
}
.footernews {
width: 744px;
}
#menutop {
width: 960px;
}
#contenido {
width: 960px;
}
#news3 {
width: 744px;
float: left;
}
#footer {
width: 960px;
}
#menuleft {
width: 216px;
float: right;
}
</style>
</head>

<body>
<div id="contenedor">
<div id="header"><img src="webs/logo.png" width="960" height="245" /></div>
<div id="menutop"><img src="webs/web_02.png" width="960" height="106" /></div>
<div id="contenido"><br />
<div id="news3">
<div class="globalnews">
<div class="headnews"><img src="webs/web_04.png" width="744" height="46" /></div>
<div class="bgnews">
<div class="contentnews">Lorem ipsum ad his scripta blandit partiendo, eum fastidii accumsan euripidis in, eum liber hendrerit an. Qui ut wisi vocibus suscipiantur, quo dicit ridens inciderint id. Quo mundi lobortis reformidans eu, legimus senserit definiebas an eos. Eu sit tincidunt incorrupte definitionem, vis mutat affert percipit cu, eirmod consectetuer signiferumque eu per. In usu latine equidem dolores. Quo no falli viris intellegam, ut fugit veritus placerat per. Lorem ipsum ad his scripta blandit partiendo, eum fastidii accumsan euripidis in, eum liber hendrerit an. Qui ut wisi vocibus suscipiantur, quo dicit ridens inciderint id. Quo mundi lobortis reformidans eu, legimus senserit definiebas an eos. Eu sit tincidunt incorrupte definitionem, vis mutat affert percipit cu, eirmod consectetuer signiferumque eu per. In usu latine equidem dolores. Quo no falli viris intellegam, ut fugit veritus placerat per.</div>
</div>
</div>
<div class="footernews"><img src="webs/web_09.png" width="744" height="47" /></div>
</div>
<div id="menuleft">
<div id="globalleft"><img src="webs/web_05.png" width="216" height="46" />
<div id="bgleft">
<div id="menucontent">· Estadísticas reales<br />
· Estadísticas del foro<br />
· Estadísticas de usuarios
</div>
</div>
<div id="globalfooter"><img src="webs/web_10.png" width="216" height="36" /></div>
</div>
</div>
</div>
<div id="footer"><img src="webs/web_13.png" width="960" height="88" /><img src="webs/web_14.png" width="960" height="96" /></div>
</div>
</body>
</html>
Resulta que quiero hacer que en el div 'footer' (el que contiene las imágenes wen_13.png y web_14.png) tenga 20px de espacio hacia arriba, es decir, que entre el final de 'globalfooter' o 'news3' y el mismo footer haya 20px de espacio, lo he intentado de muchas formas pero no funciona, le he quitado la anchura incluso, pero nada, alguien sabe algguna otra manera o en qué me estoy equivocando?

Saludos y gracias!
  #2 (permalink)  
Antiguo 24/02/2011, 16:54
davidbrepe
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: [Ayuda] Forzar a que haya 20px de espacio de margen

edita el #footer

Código CSS:
Ver original
  1. #footer {
  2. width: 960px;
  3. margin-top:20px;
  4. }
  #3 (permalink)  
Antiguo 24/02/2011, 16:57
Avatar de kiM-  
Fecha de Ingreso: mayo-2008
Mensajes: 191
Antigüedad: 15 años, 10 meses
Puntos: 2
Respuesta: [Ayuda] Forzar a que haya 20px de espacio de margen

perrdón, puse el código sin el margin-top, pero en realidad ya lo tengo puesto, justo como has dico, y sigue sin irme, ni margin ni paadding, nada :\... Qué puede ocurrir?
  #4 (permalink)  
Antiguo 24/02/2011, 17:21
davidbrepe
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: [Ayuda] Forzar a que haya 20px de espacio de margen

introduce un nuveo div
Código HTML:
Ver original
  1. <div class="relleno"> </div>
Código CSS:
Ver original
  1. .relleno{height:20px;}

comprueba si te funciona así...
de todas formas te recomiendo que instales el firebug, así puedes editar el css (de la cache dele explorador) y ver que te va fallando

Etiquetas: espacio, margen
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 11:10.