Posted By

smurf on 01/11/08


Tagged

div html


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

basicmagic
heinz1959
vali29
SpinZ
Hollow
michellebracken


Dead Centre A DIV


 / Published in: HTML
 

  1. body
  2. {
  3. margin: 0px
  4. }
  5.  
  6. #horizon
  7. {
  8. color: white;
  9. background-color: #0ff;
  10. text-align: center;
  11. position: absolute;
  12. top: 50%;
  13. left: 0px;
  14. width: 100%;
  15. height: 1px;
  16. overflow: visible;
  17. visibility: visible;
  18. display: block
  19. }
  20.  
  21. #content
  22. {
  23. position: absolute;
  24. left: 50%;
  25. width: 250px; /* Overall width of div */
  26. height: 70px; /* Overall height of div */
  27. top: -35px; /* half of the overall height */
  28. margin-left: -125px; /* half of the overall width */
  29. visibility: visible
  30. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: brent-man on January 11, 2008

Wow. Direct copy... http://snipplr.com/view/231/dead-centre-a-div/

You need to login to post a comment.