Skip to content

Instantly share code, notes, and snippets.

View dave547's full-sized avatar

Dave dave547

View GitHub Profile
@dave547
dave547 / gist:1994376
Created March 7, 2012 16:57
HTML: Basic Template
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The HTML5 Herald</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
<link rel="stylesheet" href="css/styles.css?v=1.0">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@dave547
dave547 / reset.css
Created March 7, 2012 17:07
CSS: Reset
/* Global CSS */
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,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
@dave547
dave547 / gist:1996453
Created March 7, 2012 21:47
HTML: Form Fields
<div id="form">
<div id="stylized" class="myform">
<form id="create_account" name="create_account" method="post">
<label>First Name:<span class="small">Add Your First Name</span></label>
<input type="text" name="fname" id="fname" value="<?= $_POST['fname']?>" />
<br />
<label>Last Name:<span class="small">Add Your Last Name</span></label>
<input type="text" name="lname" id="lname" value="<?= $_POST['lname']?>" />
<br />
<label> Address:<span class="small">Your Address</span></label>
@dave547
dave547 / gist:1996461
Created March 7, 2012 21:49
CSS: Form Field Styles
/* ----------- My Form ----------- */
.myform{
/*position:absolute; left:560px; top:60px;*/
margin:0 auto;
width:360px;
padding:14px;
}
/* ----------- stylized ----------- */
#stylized{
@dave547
dave547 / gist:2047207
Created March 15, 2012 21:48
CSS: Border Raius (all corners rounded)
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
@dave547
dave547 / gist:2048127
Created March 16, 2012 02:02
TERMINAL: Now you can use the MySQL command line. For exmaple to show all your databases with show databases;. (http://tinyurl.com/7ddh6l5)
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot
@dave547
dave547 / gist:2048161
Created March 16, 2012 02:27
CSS: dropdown menu css
/***********************************************
NAV CSS
***********************************************/
#nav_holder { background-color: #000; width: 100%; height: 35px; background-image: url(images/stripe_bg.jpg); background-repeat: repeat-x; margin: 0 0 10px 0;}
#main_nav{ float: left; margin: 0px 0px 10px 0px; height: 35px; color: #fff; width: 650px; /*background-color: #000;*/ }
#main_nav ul { font-size: 14px; list-style: none; }
#main_nav ul li { display: block; position: relative; float: left; z-index: 99999; }
#main_nav li ul { display: none; }
#main_nav ul li a { display: block; text-decoration: none; color: #ffffff; padding: 10px 15px; margin-left: 1px; white-space: nowrap; border-right: 1px solid #444; }
@dave547
dave547 / gist:2067197
Created March 18, 2012 00:51
WORDPRESS: create excerpt for blog
<?php the_excerpt(); // Show excerpt and not full post content ?>
@dave547
dave547 / gist:2118858
Created March 19, 2012 16:48
HTML: Blank Space
&nbsp;
@dave547
dave547 / gist:2127114
Created March 19, 2012 21:06
JAVASCRIPT: LINK IN HEADER
<script type="text/javascript" src="script.js"></script>