Skip to content

Instantly share code, notes, and snippets.

@toddaeverett
toddaeverett / phpErrorsOn
Created August 20, 2012 16:25
Activate PHP error messaging
<?php
error_reporting(E_ALL);
ini_set('display_errors','On');
?>
@toddaeverett
toddaeverett / gist:3405554
Created August 20, 2012 16:27
Kill extra space around IE submit buttons
button {width: auto; overflow: visible;}
@toddaeverett
toddaeverett / gist:3405560
Created August 20, 2012 16:28
ColdFusion 301 Redirect
<cfheader statuscode="301" statustext="Moved permanently">
<cfheader name="Location" value="index.cfm?vAction=graphic-design">
hr { height:1px; border:none; background-color:#DEDEDE; color:#DEDEDE; }
@toddaeverett
toddaeverett / gist:3405569
Created August 20, 2012 16:30
Create "array.indexOf" function in IE
// create "Array.indexOf" function in IE
if(!Array.prototype.indexOf){
Array.prototype.indexOf=function(obj,start){
for(var i=(start||0),j=this.length;i<j;i++){
if(this[i]==obj){return i;}
}
return -1;
}
}
@toddaeverett
toddaeverett / gist:3405594
Created August 20, 2012 16:32
Image replacement for form submit button
input#submit_btn {text-indent:-9000px;width:24px;height:24px;background:url(../images/go_btn.png) no-repeat 0 0;border:none;cursor:pointer;text-transform:capitalize;} /* text-transform:capitalize makes the negative text indent work in IE */
@toddaeverett
toddaeverett / gist:3405605
Created August 20, 2012 16:33
Tables: setting padding, column width and column text-align via CSS
<!-- The CSS part -->
table.week tbody tr td {padding:10px;text-align:center;background:url(../images/dots439bbe.png) repeat-x 0 100%;}
table.week tbody tr td[headers=title] {width:191px;text-align:left;}
table.week tbody tr td[headers=date] {width:100px;}
table.week tbody tr td[headers=host] {width:52px;}
table.week tbody tr td[headers=cost] {width:40px;}
table.week tbody tr td[headers=notes] {text-align:left;}
<!-- The HTML part -->
<table cellspacing="0" class="week" id="week1">
@toddaeverett
toddaeverett / gist:3405614
Created August 20, 2012 16:35
Get rid of dotted borders around links in FF; use with image replacement technique
a:focus {-moz-outline-style:none;outline:none;}
@toddaeverett
toddaeverett / gist:3405621
Created August 20, 2012 16:37
Form Starter
<form id="" action="" method="">
<fieldset>
<legend></legend>
<p><label for=""></label><br />
<input type="text" name="" style="width:135px;" maxlength="35" /></p>
<p><input type="checkbox" name="" value="" /> <label for=""></label></p>
<p><label for=""></label><br />
@toddaeverett
toddaeverett / gist:3405635
Created August 20, 2012 16:38
Breadcrumb Navigation CSS
/* Breadcrumb Nav */
#breadcrumb {padding-top:10px;font-size:10px;}
#breadcrumb ul {margin:0px;padding:0px;}
#breadcrumb ul li {display:inline;padding:0px;margin:0 5px 0 0;color:#989898;background:none;}
#breadcrumb ul li a, #breadcrumb ul li a:hover {background:url(images/breadcrumbArrowR.gif) 100% 4px no-repeat;padding:0px 8px 0px 0px;}
#breadcrumb ul li a {text-decoration:underline;color:#69F;}
#breadcrumb ul li a:hover {text-decoration:underline;color:#f00;}
/* End Breadcrumb Nav */