Ver Mensaje Individual
  #4 (permalink)  
Antiguo 07/08/2013, 10:28
darkhack3r22
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Problema para centrar un DIV...

La posicion tienes que definirla lo primero:

Código CSS:
Ver original
  1. <style>
  2. body{
  3. background-color: #CCC;
  4. }
  5.  
  6. #blanco{
  7. position: absolute;
  8. background: white;
  9. width: 800px;
  10. height: 100%;
  11. }
  12.  
  13. .izquierda {
  14. position: absolute;
  15. background: orange;
  16. width: 20px;
  17. height: 100%;
  18. float: left;
  19. }
  20.  
  21. .derecha {
  22. position: relative;
  23. background: orange;
  24. width: 20px;
  25. height: 100%;
  26. float: right;
  27. </style>