Ver Mensaje Individual
  #7 (permalink)  
Antiguo 01/06/2013, 19:22
Avatar de ArturoGallegos
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: Centrar Divs con css Solucion

Se nota tu edad, hoy día cualquier niño aprende técnicas de antaño y malas practicas con las que cree que es fácil aprender.

Te faltan años de practica y experiencia en campo laboral para que veas que no todo es sencillo.

Usar javascript para poner un simple pie de pagina siempre abajo es una pésima practica, se debe hacer con CSS.

Código HTML:
Ver original
  1. <div id="mainpage"><div>
  2. <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
  3. </div></div>
  4. <div id="footer">2013 &copy; Arturo Gallegos</div>
Código CSS:
Ver original
  1. *{margin:0;padding:0;}
  2. html,body{height:100%;}
  3. #mainpage{min-height:100%;}
  4. #mainpage>div{padding-bottom:30px;}
  5. #footer{height:30px;margin-top:-30px;background:#999;}