Set Text Selection Color
/* Mozilla based browsers */
::-moz-selection {
background-color: #FFA;
color: #000;
}
/* Works in Safari */
::selection {
background-color: #FFA;
color: #000;
}
CSS Centering
**SelectionInsertionPlaceholder** {
position: absolute;
width: 100px;
height: 100px;
top: 50%;
left: 50%;
margin-top: -50px;
margin-left: -50px;
}
Added to CSS by Tony McCallie
CSS links sequence
a:link {
color: #;
text-decoration: underline
}
a:visited {
color: #;
}
a:hover,
a:focus {
color: #;
text-decoration: none;
}
a:active {
}
Added to CSS by Bartek Stańkowski
Fast PNG Transparency for ie6
/* png ie transparency */
.png_hack{
background-image: url(”../img/the_image.png”) !important;
background-image: none;
filter: none !important;
filter:
progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’img/the_image.png’);
}
Tooltips CSS
/* <a href="#" class="tooltip">Tooltip<span> Extra info </span></a> */
a:hover {background:#ffffff; text-decoration:none;} /*BG 4 IE6 grrg */
a.tooltip span {display:none; padding:2px 3px; margin-left:8px; width:130px;}
a.tooltip:hover span{display:inline; position:absolute; background:#ffffff; border:1px solid #cccccc; color:#6c6c6c;}
Fast CSS Debugger
* { outline: 2px dotted red }
* * { outline: 2px dotted green }
* * * { outline: [..
Clearfix (all browsers)
/* =Clearfix (all browsers)
--------------------------------*/
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
/* IE6 */
* html .clearfix {height: 1%;}
/* IE7 */
*:first-child+html .clearfix {min-height: 1px;}
Added to CSS by Brad Dielman
Eric Meyer's Browser Reset Reloaded
/* Eric Meyer's Reset Reloaded */
/* http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ */
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,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
/* remember to highlight inserts somehow! */
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: collapse;
border-spacing: 0;
}
Added to CSS by Daryn St. Pierre