Skip to content

Instantly share code, notes, and snippets.

@townivan
townivan / gist:03f956f0d2e4ebb77f6e
Created July 16, 2014 18:02
my quick html boilerplate
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.min.css">
@townivan
townivan / gist:aea53cd482cd053e41e4
Created July 25, 2014 15:16
yahoo mail won't center your table? Try this.
<table style="table-layout: fixed; margin: 0 auto;" align="center">
@townivan
townivan / gist:22818255d0a99843bb08
Created July 29, 2014 13:02
Quick querystring with javascript example
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>jquery for querystring parsing</title>
</head>
<body>
<p>To try this out, add something like <pre>?fname=Joe&lname=Smith</pre> to the end of the URL for this page.</p>
@townivan
townivan / gist:29815c04c31a04b94caf
Created September 23, 2014 18:52
Prevent superscripts from breaking line-height
sup, sub {
vertical-align: baseline;
position: relative;
top: -0.4em;
}
sub { top: 0.4em; }
/*
Source: http://css-tricks.com/snippets/css/prevent-superscripts-and-subscripts-from-affecting-line-height/
*/
@townivan
townivan / gist:952b0385b59c559846ff
Created September 30, 2014 17:13
img padding not working in Outlook 2007
issue: padding and margin on the img tag don't work in Outlook 2007
use the old hspace="8" on the image (which will add the spacing that you want on outlook) then add margin-left="0px" to trim off the extra on the side that you don't want. Unfortunately this will still have the extra spacing on the side that you don't want for Outlook 2007 but the other email clients will be ok.
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Data" %>
<%@ Page Language="C#" Debug="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script language="C#" runat="server">
void Page_Error(Object source, EventArgs e)
{
@townivan
townivan / calc.html
Last active December 11, 2015 15:39
JS load external JSON into localstorage
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Calculator</title>
<style>body{display:none;}</style>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script>
function loadMyJson() {
return $.getJSON('_config.json');
@townivan
townivan / index.html
Last active June 29, 2016 14:48
bootstrap boilerplate 3.6
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>
<link rel="shortcut icon" href=""><!-- removes error in console if you don't have a favicon -->
@townivan
townivan / raquo.html
Last active February 19, 2016 19:50
raquo
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>raquo</title>
<style type="text/css">
a:link{text-decoration:none;}
a:hover, a:active{text-decoration:underline;}
.raquoSpan{
font-family:Arial, Helvetica, sans-serif;