Skip to content

Instantly share code, notes, and snippets.

View don1138's full-sized avatar
🐝

Don Schnitzius don1138

🐝
View GitHub Profile
@don1138
don1138 / top-page-shadow.css
Created June 11, 2013 21:53
CSS Webpage Top Box Shadow
/* Webpage Top Box Shadow */
body:before {
content: "";
position: fixed;
top: -10px;
left: 0;
width: 100%;
height: 10px;
@don1138
don1138 / hand-cursor.css
Created June 11, 2013 21:52
CSS Force Hand Cursor Over Clickable Items
/* Force Hand Cursor Over Clickable Items */
a[href], input[type='submit'], input[type='image'], label[for], select, button, .pointer {
cursor: pointer;
}
@don1138
don1138 / display-urls.css
Created June 11, 2013 21:54
CSS Display URLS In A Printed Webpage
/* Display URLS In A Printed Webpage */
@media print {
a:after {
content: " [" attr(href) "] ";
}
}
@don1138
don1138 / debug.css
Created June 11, 2013 22:00
CSS Debug Helpers
* { 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 }
@don1138
don1138 / cleanup.css
Created June 11, 2013 22:00
CSS Cleanup Items
a{white-space:nowrap;} /* no break anchors */
a:active, a:focus{outline:none;} /* remove active link borders */
html{overflow:-moz-scrollbars-vertical;} /* Firefox scrollbar fix */
textarea{overflow:auto;} /* IE scrollbar fix */
input[type="button"] { cursor: pointer; } /* cursor display fix */
@don1138
don1138 / text-effects.css
Created June 11, 2013 22:03
CSS Text Effects
.clean-black-text-on-white {
color: #222; text-shadow: 0 2px 1px #bbbaba;
filter: dropshadow(color=#bbbaba, offX=0,offY=1);
}
.soft-grey-shadow-on-grey {
background-color: #474747;
color: #999; text-shadow: 0 3px 8px #2a2a2a;
filter:dropshadow(color=#bbbaba, offX=0,offY=1);
}
@don1138
don1138 / text-breakouts.css
Created June 11, 2013 22:10
CSS Prevent Text Breakouts
.prevent-text-breakouts {
-ms-word-break: break-all;
word-break: break-all;
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
@don1138
don1138 / margin-caps.css
Created June 11, 2013 22:09
CSS Margins for First/Last Items
* > :first-child { margin-top: 0 !important; margin-left: 0 !important; }
* > :last-child { margin-bottom: 0 !important; margin-right: 0 !important; }
@don1138
don1138 / sticky-footer.html
Created June 11, 2013 22:08
CSS Sticky Footer
body {
/* The Browser makes its best guess with its own rendering engine */
/* results will vary based on the browser */
text-rendering: auto;
/* The Browser chooses page speed over font calculations and legibility */
text-rendering: optimizeSpeed;
/* The Browser chooses legibility over font calculations and page speed */
text-rendering: optimizeLegibility;