Skip to content

Instantly share code, notes, and snippets.

@tcomaj
tcomaj / index.html
Created April 28, 2012 00:55 — forked from garethrees/application.html.erb
HTML: Boilerplate <head> Section
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- Make a DNS handshake with a foreign domain, so the connection goes faster when the user eventually needs to access it. This works well for loading in assets (like images) from another domain, or a JavaScript library from a CDN. -->
<link rel="dns-prefetch" href="//ajax.googleapis.com" />
<link rel="dns-prefetch" href="//s3.amazonaws.com" />
<!-- Make sure the latest version of IE is used -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
@tcomaj
tcomaj / CSS: Eric Meyer Reset
Created May 13, 2012 02:38
CSS: Eric Meyer Reset
/* v2.0 | 20110126
http://meyerweb.com/eric/tools/css/reset/
License: none (public domain)
*/
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, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
@tcomaj
tcomaj / HTML: Example Form Markup
Created May 24, 2012 01:26
HTML: Example Form Markup
<form id="myForm" action="#" method="post">
<div>
<label for="name">Text Input:</label>
<input type="text" name="name" id="name" value="" tabindex="1" />
</div>
<div>
<h4>Radio Button Choice</h4>
<label for="radio-choice-1">Choice 1</label>
@tcomaj
tcomaj / CSS: Min-height in IE
Created May 24, 2012 13:35
CSS: Min-height in IE
.box {
min-height:500px;
height:auto !important;
height:500px;
}
@tcomaj
tcomaj / CSS: Text Selection
Created May 24, 2012 13:46
CSS: Text Selection
::selection {
color: white;
background-color: #ef8629;
}
::-moz-selection {
color: white;
background: #ef8629;
}
@tcomaj
tcomaj / CSS: Transparency (Cross Browser)
Created May 24, 2012 13:49
CSS: Transparency (Cross Browser)
.transparent_class {
/* IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
/* IE 5-7 */
filter: alpha(opacity=50);
/* Netscape */
-moz-opacity: 0.5;
@tcomaj
tcomaj / CSS: Fixed Footer (IE6)
Created May 24, 2012 13:53
CSS: Fixed Footer (IE6)
@tcomaj
tcomaj / CSS: Remove textarea scrollbar in IE
Created May 24, 2012 13:54
CSS: Remove textarea scrollbar in IE
textarea{
overflow:auto;
}
@tcomaj
tcomaj / CSS: Font-face import
Created May 24, 2012 14:09
CSS: Font-face import
@font-face {
font-family: 'MyFontFamily';
src: url('myfont-webfont.eot?#iefix') format('embedded-opentype'),
url('myfont-webfont.woff') format('woff'),
url('myfont-webfont.ttf') format('truetype'),
url('myfont-webfont.svg#svgFontName') format('svg');
}
@tcomaj
tcomaj / CSS: IE6, IE7 Double Margin, Padding Bug
Created May 24, 2012 14:14
CSS: IE6, IE7 Double Margin, Padding Bug
ul li {
float: left;
margin-left: 5px;
*display: inline; /*IE7 and below*/
_display: inline; /*IE6 and below*/
}
/* this example fixes double left margin bug */