vertical align in IE6-8, Firefox


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. div {
  2. display: table;
  3. width: 144px;
  4. height: 115px;
  5. }
  6.  
  7. div span {
  8. display: table-cell;
  9. vertical-align: middle;
  10. text-align: center;
  11. }
  12.  
  13. .ie6 div, .ie7 div {
  14. padding-top: 3em;
  15. height: 8em;
  16. voice-family: "\"}\"";
  17. voice-family: inherit;
  18. height: 4em;
  19. }
  20.  
  21. .ie6 div span, .ie7 div span {
  22. margin-top:-0.5em;
  23. display:block;
  24. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.