CSS 기본 IE hack
Fron-End 디자인/css 2009/06/29 12:32 |1. Vertical align div (세로가운데 정렬)
http://stylizedweb.com/2008/02/01/vertical-align-div/
2. Min-Height (최소높이주기)
selector {
min-height:500px;
height:auto; !important
height:500px;
}
3. PNG transparency (투명한 PNG파일 적용하기)
http://stylizedweb.com/2007/12/30/png-transparency-issues/
4. Autoclear
.container:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.container {display: inline-table;}
/* Hides from IE-mac \*/
* html .container {height: 1%;}
.container {display: block;}
/* End hide from IE-mac */
5. Reset CSS (CSS로 속성초기화)
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
border:0pt none;
font-family:inherit;
font-size:100%;
font-style:inherit;
font-weight:inherit;
margin:0pt;
outline-color:invert;
outline-style:none;
outline-width:0pt;
padding:0pt;
vertical-align:baseline;
}
table {
border-collapse:separate;
border-spacing:0pt;
}
caption, th, td {
font-weight:normal;
text-align:left;
}
blockquote:before, blockquote:after, q:before, q:after {
content:"";
}
blockquote, q {
quotes:"" "";
}
strong {
font-weight:bold;
}
em {
font-style:italic;
}
* {
margin:0pt;
padding:0pt;
}
6. Scrolling Render IE (IE 스크롤링 랜더)
html {
background : url(null) fixed no-repeat;
}
7. Opacity (투명도 주기)
#transdiv {
filter:alpha(opacity=75);
-moz-opacity:.75;
opacity:.75;
}
8. PRE Tag (PRE 테그)
pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
9. Li Background Repeat IE (IE에서 li 배경 반복)
<!--[if lt IE 7]>
<style>
#leftnav li { zoom: 1;} /* haslayout=true */
</style>
<![endif]-->
10. Good to know (알면좋은것)
window.google_render_ad();
@charset "UTF-8";
/* ----------------------------------------------------------------------
WinIE7
---------------------------------------------------------------------- */
*:first-child+html selector{property:value;}
/* ----------------------------------------------------------------------
WinIE6 & Mac IE
---------------------------------------------------------------------- */
* html selector{property:value;}
/* ----------------------------------------------------------------------
WinIE6
---------------------------------------------------------------------- */
/*\*/
* html selector{property:value;}
/**/
/* ----------------------------------------------------------------------
MacIE
---------------------------------------------------------------------- */
/*\*//*/
selector{property:value;}
/**/