CSS Tricks: the most complete CSS Hacks collections for any IE (Internet Explorer) browser version


IE8 Only

.myClass  { 
     color:red/; /* red color */
     padding:70px/; /* padding 70px only for Internet Explorer 8 */
}

IE 6 Only

* html .myClass {
	...
} 

All except IE6 standards

.myClass { 
	property /**/: value; 
} 

IE 7 Only

*:first-child+html .myClass {
   ...
}

Continue reading

CSS vertical und horisontal Alignment in DIV Elements


This CSS-code for elements, which must be aligned horisontal und vertical in DIV-Element.

Parent Element

#parent {
display: table;
float: left;
height: 80px; /*must be change for self*/
vertical-align: middle;
width: 100%;
}

Child element

#child {
display: table-cell;
vertical-align: inherit; /*inherit alignment like a parent*/
width: 125px; /*optional, if there are more elements in parent block */
}