/* add filetype icons */
a[href^="mailto:"] {display:inline-block; padding-left:20px; line-height:18px; background:transparent url(../images/icons/icon_mailto.gif) center left no-repeat;}
a[href$='.pdf'] {display:inline-block; padding-left:20px; line-height:18px; background:transparent url(../images/icons/icon_pdf.gif) center left no-repeat;}
a[href$='.swf'], a[href$='.fla'], a[href$='.swd'] {display:inline-block; padding-left:20px; line-height:18px; background:transparent url(../images/icons/icon_flash.gif) center left no-repeat;}
a[href$='.xls'], a[href$='.csv'], a[href$='.xlt'], a[href$='.xlw'] {display:inline-block; padding-left:20px; line-height:18px; background:transparent url(../images/icons/icon_excel.gif) center left no-repeat;}
a[href$='.ppt'], a[href$='.pps'] {display:inline-block; padding-left:20px; line-height:18px; background:transparent url(../images/icons/icon_powerpoint.gif) center left no-repeat;}
a[href$='.doc'], a[href$='.rtf'], a[href$='.txt'], a[href$='.wps'] {display:inline-block; padding-left:20px; line-height:18px; background:transparent url(../images/icons/icon_doc.gif) center left no-repeat;}
a[href$='.zip'], a[href$='.gzip'], a[href$='.rar'] {display:inline-block; padding-left:20px; line-height:18px; background:transparent url(../images/icons/icon_zip.gif) center left no-repeat;}
/* cross browser transparency */
selector {
filter: alpha(opacity=60); /* MSIE/PC */
-moz-opacity: 0.6; /* Mozilla 1.6 and older */
opacity: 0.6;
}
/* joomla 1.5 ie conditional comments */
/* random hacks */
IE 6 and below
* html {}
IE 7 and below
*:first-child+html {} * html {}
IE 7 only
*:first-child+html {}
IE 7 and modern browsers only
html>body {}
Modern browsers only (not IE 7)
html>/**/body {}
Recent Opera versions 9 and below
html:first-child {}
/* min-height hack */
selector { min-height: 500px; _height: 500px; }
/* box model hack */
div.content {
width:400px;
voice-family: "\"}\"";
voice-family:inherit;
width:300px;
}
.sample {
height: 15px;
#height: 15px; /* only IE */
_height: 21px; /* only IE6 & older */
}
html>body .content {
width:300px;
}
/* IE6 Fixed position fix */
html, body {
height: 100%;
overflow: auto;
}
body #cornerImage {
position: absolute;
bottom: 0;
}
/* debug css*/
* { outline: 2px dotted red }
* * { outline: 2px dotted green }
* * * { outline: 2px dotted orange }
* * * * { outline: 2px dotted blue }
* * * * * { outline: 1px solid red }
* * * * * * { outline: 1px solid green }
* * * * * * * { outline: 1px solid orange }
* * * * * * * * { outline: 1px solid blue }
Random but useful css snippets from all over
By kuslahne - October 5th, 2008
Tagged:
- Login or register to post comments
- Feed: reinholdweber
- Original article