CSS IE Hack Fix

Try using IE Conditional Comments to fix Internet Explorer when it fails to render content (positions, padding and margins) the same way other modern browser are able to reflect accurate style sheets.

/******** HACK TO CLEAR STYLES **********/
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;}
table{border-collapse:collapse;border-spacing:0;}
fieldset,img{border:0;}
address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}
ol,ul {list-style:none;}
caption,th {text-align:left;}
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
q:before,q:after{content:”;}
abbr,acronym {border:0;}
/**************************************/

/*********** HACKS!: FIX BOX PADDING AND STUFF **************/
/*********** HACKS!: FIX CENTERING BOX ON IE **************/
/* Self-clearing Containers */
#container:after, #menu:after {content:”.”;display:block;height:0;clear:both;visibility:hidden;}
#container, #menu {display:inline-block;}
/* Force IE7 to respect generated content */
/* Hide the next declaration from IE Mac */
* html #container, * html #menu {height:1%;display:block;}
/* IE box model hacks */
* html #left, * html #right {width:178px;width:159px;}
* html #center {width:400px;width:380px;}
* html #menu {height:2em;}
/***********************************/
/*****************************************/
/***********************************************/

You may also like...

Leave a Reply