We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Ballyhoo


Posted By

masaya on 01/14/07


Tagged

css hack


Versions (?)


Who likes this?

4 people have marked this snippet as a favorite

samuraicoder
basicmagic
markireland
stoker


hack.css


Published in: CSS 


WinIE7,6,MacIE5 に対応するハック.


  1. @charset "UTF-8";
  2.  
  3.  
  4.  
  5. /* ----------------------------------------------------------------------
  6. WinIE7 のみ
  7. ---------------------------------------------------------------------- */
  8. *:first-child+html *{
  9. font-family: "MS PGothic", sans-serif;
  10. }
  11.  
  12. *:first-child+html blockquote *{
  13. font-family: "MS PMincho", serif;
  14. }
  15.  
  16. *:first-child+html #head .Container,
  17. *:first-child+html #nav .Container,
  18. *:first-child+html #content .Container,
  19. *:first-child+html #extra .Container{
  20. height: 1%;
  21. }
  22.  
  23. /* ----------------------------------------------------------------------
  24. WinIE6 以下
  25. ---------------------------------------------------------------------- */
  26. /*\*/
  27. * html body{
  28. text-align: center;
  29. }
  30.  
  31. * html *{
  32. font-family: "MS PGothic", sans-serif;
  33. }
  34.  
  35. * html blockquote *{
  36. font-family: "MS PMincho";
  37. }
  38.  
  39. * html #head .Container,
  40. * html #nav .Container,
  41. * html #content .Container,
  42. * html #extra .Container,
  43. * html #foot .Container{
  44. text-align: left;
  45. width: expression( document.body.clientWidth > 740? "44em" : "auto" );}
  46. * html #content #main{
  47. width: 65%;}
  48. * html #content #main .Container{
  49. width: 100%;}
  50. * html #content #sub{
  51. width: 35%;}
  52. * html #content #sub .Container{
  53. width: 100%;
  54. }
  55.  
  56. * html #head .Container,
  57. * html #nav .Container,
  58. * html #content .Container,
  59. * html #extra .Container{
  60. height: 1%;
  61. }
  62. /**/
  63.  
  64. /* ----------------------------------------------------------------------
  65. MacIE のみ
  66. ---------------------------------------------------------------------- */
  67. /*\*//*/
  68. *{
  69. font-family: "ヒラギノ角ゴ Pro W3", sans-serif;
  70. }
  71.  
  72. blockquote *{
  73. font-family: "ヒラギノ明朝 Pro W3", serif;
  74. }
  75.  
  76. #head .Container,
  77. #nav .Container,
  78. #content .Container,
  79. #extra .Container{
  80. display: inline-table;
  81. }
  82.  
  83. #head,
  84. #nav,
  85. #content,
  86. #extra,
  87. #foot{
  88. text-align: center;
  89. width: 100%;}
  90. #head .Container,
  91. #nav .Container,
  92. #content .Container,
  93. #extra .Container,
  94. #foot .Container{
  95. text-align: left;
  96. width: 740px;}
  97. #content .Container .Container{
  98. width: 100%;}
  99. #main{
  100. width: 480px;}
  101. #main .Container{
  102. margin-right: 0;}
  103. #sub{
  104. width: 240px;}
  105. #sub .Container{
  106. margin-left: 0;
  107. }
  108.  
  109. #e1,
  110. #e2,
  111. #e3{
  112. width: 240px;}
  113. #e2{
  114. margin: 0 10px;
  115. }
  116. /**/

Report this snippet 

You need to login to post a comment.