2008/11/27 12:17
Conditional comments를 이용해서 CSS-Hack 안쓰고 코딩하기 작은 팁2008/11/27 12:17
body에다가 class를 부여하여 css selector만 이용하는 방법입니다.
가장 많이 쓰이는 IE, IE6, IE7, 그 외.. 로 예제코드 만들어 봤습니다. (실제로 저는 이렇게 해서 사용합니다.)
Conditional comments에 대해서
가장 많이 쓰이는 IE, IE6, IE7, 그 외.. 로 예제코드 만들어 봤습니다. (실제로 저는 이렇게 해서 사용합니다.)
<!--[if lte IE 6]><body class="ie ie6"><![endif]-->
<!--[if IE 7]><body class="ie ie7"><![endif]-->
<!--[if !IE]>--><body><!--<![endif]-->
<!--[if IE 7]><body class="ie ie7"><![endif]-->
<!--[if !IE]>--><body><!--<![endif]-->
#content { color: red; }
.ie #content { color: blue; }
.ie6 #content { color: pink; }
.ie7 #content { color: green; }
.ie #content { color: blue; }
.ie6 #content { color: pink; }
.ie7 #content { color: green; }
Conditional comments에 대해서
- http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx
- http://www.quirksmode.org/css/condcom.html
'작은 팁' 카테고리의 다른 글
| gem으로 mime-types update 혹은 install 시 나는 Error(on Gentoo) (2) | 2009/03/10 |
|---|---|
| IE7에서 text-decoration이 이상하게 나올때. (0) | 2009/02/02 |
| Conditional comments를 이용해서 CSS-Hack 안쓰고 코딩하기 (4) | 2008/11/27 |
| [JS] IE6인지 구분하기 (0) | 2008/08/20 |
| 코딩 하기 전 에 문서부터 디자인을 하라 (2) | 2008/03/19 |
| 탭메뉴는 어떻게 코딩 해야 할까? (3) | 2008/03/06 |
