Skip to content

Instantly share code, notes, and snippets.

@ingozoell
ingozoell / display-inline-block-FIX.txt
Created August 1, 2013 07:35
display-inline: block [FIX] – IE6 + FF<2
/* display-inline: block [FIX] – IE6 + FF<2 */
.dib { display:-moz-inline-stack; display:inline-block; zoom:1; *display:inline; }
@ingozoell
ingozoell / cross-browser-css-opacity.css
Created August 1, 2013 07:51
Cross-Browser CSS "Opacity"
.cross-browser-opacity {
/* Modern Browsers */ opacity: 0.7;
/* IE 8 */ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
/* IE 5-7 */ filter: alpha(opacity=70);
/* Netscape */ -moz-opacity: 0.7;
/* Safari 1 */ -khtml-opacity: 0.7;
}
/* http://css-tricks.com/snippets/css/cross-browser-opacity/ */
@ingozoell
ingozoell / position-fixed.css
Created August 18, 2013 17:16 — forked from subtleGradient/position-fixed.css
IE 6 – position: fixed;
/*Make position:fixed work in IE6!*/
.fixed-top /* position fixed Top */{position:fixed;bottom:auto;top:0;}
.fixed-bottom /* position fixed Bottom */{position:fixed;bottom:0;top:auto;}
.fixed-left /* position fixed Left */{position:fixed;right:auto;left:0;}
.fixed-right /* position fixed right */{position:fixed;right:0;left:auto;}
* html,* html body /* IE6 Fixed Position Jitter Fix */{background-image:url(about:blank);background-attachment:fixed;}
* html .fixed-top /* IE6 position fixed Top */{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop));}
* html .fixed-right /* IE6 position fixed right */{position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft+document.documentElement.clientWidth-this.offsetWidth)-(parseInt(this.currentStyle.marginLeft,10)||0)-(parseInt(this.currentStyle.marginRight,10)||0));}
@ingozoell
ingozoell / border-radius.css
Created October 31, 2013 17:48
border-radius (cross-browser)
.round {
/* Safari 3-4, iOS 1-3.2, Android 1.6- */
-webkit-border-radius: 12px;
/* Firefox 1-3.6 */
-moz-border-radius: 12px;
/* Opera 10.5, IE 9, Safari 5, Chrome, Firefox 4, iOS 4, Android 2.1+ */
border-radius: 12px;
}
@ingozoell
ingozoell / hidpi-retina-detection.css
Created November 3, 2013 13:25
Remove image height and width attribute excerpt for HiDPI/Retina devices
#hidpi { position: relative; display: none; z-index: 0;}
/* Hidpi/Retina Check
/* https://gist.github.com/sergejmueller/2642698 */
@media (-o-min-device-pixel-ratio: 5/4),
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi) {
#hidpi { display: none; position: relative; z-index: -1; }
}
@ingozoell
ingozoell / css3-transition-jquery-fallback.html
Last active May 18, 2017 17:23
css3-transition-jquery-fallback Animate
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>HTML5</title>
<style>
/* http://www.onextrapixel.com/2011/10/17/animating-colors-using-css3-transitions-with-jquery-fallback/ */
/* shorthand notation for transition properties */
/* transition: [transition-property] [transition-duration] [transition-timing-function] [transition-delay]; */
@ingozoell
ingozoell / optimized-htaccess-wp
Created November 3, 2013 17:54
Optimized .htaccess file for WordPress (based on HTML5 Boilerplate)
################################################################################################################
# #
# HTML5 BOILERPLATE #
# https://github.com/h5bp/html5-boilerplate/blob/master/.htaccess #
# 04/01/2013 #
################################################################################################################
@ingozoell
ingozoell / css-mobile-detection.css
Created November 3, 2013 18:00
Mobile Detection via CSS/jQuery
#mobile-detection { position: relative; display: none; z-index: 0; }
@media only screen and (max-width: 600px) {
#mobile-detection { position: relative; display: none; z-index: -1;}
#page {top:10px; }
}