Stylesheets For Printing
Using a special stylesheet to help with your printable content can save you a ton of headache. You may have read that tailoring your content to print properly is a lot of work or can be a frustrating experience, setting you at odds with printers and clients alike. When executed properly, it’s a very simple process that requires only one file (print.css) and yields a few tangible...
Read MoreUsing a CSS Reset
A CSS reset is a set of CSS rules you use as a starting point in order to preemptively quell bugs that may arise due to the Browser Wars. A CSS reset does this by applying consistent values to elements that browsers typically render differently by default (such as margin, padding and font-inheritance). Below is a reset you can use, originally written by Eric Meyer. html, body, div, span,...
Read MoreDOCTYPE Explained
What is DOCTYPE and why do I care? The DOCTYPE declaration is the first line of code in any web document. It tells the browser what type of markup you wrote. Declaring one but coding for another may result in errors or inconsistencies across the spectrum of browsers. I’ve offered a few downloads that you can set as blank starting documents, automating a few lines of code that you’ll...
Read MoreRandom Quote PHP Script
The script below displays a random string of text each time your page is loaded or refreshed. It is not the most fancy or flexible – but it is extremely simple and easy. This could prove useful if you are doing something with limited scope. <?php function randomQuote() { $quotes[] = '"Quote goes here"'; $quotes[] = '"Quote goes here"'; $quotes[] = '"Quote goes here"'; $quotes[] =...
Read MoreTest Your Server’s PHP Mail
Is your server’s PHP mail function enabled or disabled? Test it with this quick script. If you get an email, it works! <?php mail("username@domain.com", "Test Subject", "Test Message Body"); ?>
Read MoreLet Google Serve Your jQuery
Whether you have moved to jQuery or are using prototype.js, you can include your JS library directly from Google’s code library. Getting your library from google gives you an awesome perk: There’s a good chance that users visiting your site have it cached because they’ve previously visited Google (or another site getting the code from google). This essentially makes it a...
Read More