common.css 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright 2009 The Closure Library Authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by the Apache License, Version 2.0.
  5. * See the COPYING file for details.
  6. */
  7. /*
  8. * Cross-browser implementation of the "display: inline-block" CSS property.
  9. * See http://www.w3.org/TR/CSS21/visuren.html#propdef-display for details.
  10. * Tested on IE 6 & 7, FF 1.5 & 2.0, Safari 2 & 3, Webkit, and Opera 9.
  11. *
  12. * @author attila@google.com (Attila Bodis)
  13. */
  14. /*
  15. * Default rule; only Safari, Webkit, and Opera handle it without hacks.
  16. */
  17. .goog-inline-block {
  18. position: relative;
  19. display: -moz-inline-box; /* Ignored by FF3 and later. */
  20. display: inline-block;
  21. }
  22. /*
  23. * Pre-IE7 IE hack. On IE, "display: inline-block" only gives the element
  24. * layout, but doesn't give it inline behavior. Subsequently setting display
  25. * to inline does the trick.
  26. */
  27. * html .goog-inline-block {
  28. display: inline;
  29. }
  30. /*
  31. * IE7-only hack. On IE, "display: inline-block" only gives the element
  32. * layout, but doesn't give it inline behavior. Subsequently setting display
  33. * to inline does the trick.
  34. */
  35. *:first-child+html .goog-inline-block {
  36. display: inline;
  37. }