<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Matt Varone&#187; Web Design and Development Articles, Tutorials, Scripts and Plugins » Matt Varone</title>
	<atom:link href="http://www.mattvarone.com/category/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mattvarone.com</link>
	<description>Creative Developer</description>
	<lastBuildDate>Sun, 07 Mar 2010 12:47:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
<link>http://www.mattvarone.com</link>
<url>http://www.mattvarone.com/wp-content/mbp-favicon/favicon.ico</url>
<title>Matt Varone</title>
</image>
		<item>
		<title>UItoTop jQuery Plugin</title>
		<link>http://www.mattvarone.com/web-design/uitotop-jquery-plugin/</link>
		<comments>http://www.mattvarone.com/web-design/uitotop-jquery-plugin/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 14:11:56 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Web Design & Development]]></category>
		<category><![CDATA[INTERFACE DESIGN]]></category>
		<category><![CDATA[JQUERY]]></category>
		<category><![CDATA[PLUGINS]]></category>
		<category><![CDATA[RESOURCES]]></category>

		<guid isPermaLink="false">http://www.mattvarone.com/?p=763</guid>
		<description><![CDATA[
 Current version: 1.1 3/4/10
— Inspired by the great idea of David Walsh&#8217;s  jQuery topLink Plugin, I made a similar plugin but with two key differences, this one does not require you to add extra html markup or extra plugins to function. It will only work when JavaScript is turned on ( on purpose [...]<p>This is a post from: <a href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a href="http://www.mattvarone.com/web-design/uitotop-jquery-plugin/">UItoTop jQuery Plugin</a></p>
]]></description>
			<content:encoded><![CDATA[<p><img class="border aligncenter size-full wp-image-765" title="uitotop" src="http://www.mattvarone.com/wp-content/uploads/2009/09/uitotop.jpg" alt="uitotop" width="560" height="134" /></p>
<p class="message-box info"> Current version: <strong>1.1</strong> <small>3/4/10</small></p>
<p>— Inspired by the great idea of David Walsh&#8217;s <a href="http://davidwalsh.name/jquery-top-link/"> jQuery topLink Plugin</a>, I made a similar plugin but with two key differences, this one does not require you to add extra html markup or extra plugins to function. It will only work when JavaScript is turned on ( on purpose ), It&#8217;s easy to setup with only one line of code, and it works cross-browser nicely ( Tested: IE6-8, FF, Safari ). Optionally it can benefit from the <a href="http://gsgd.co.uk/sandbox/jquery/easing/">jQuery Easing plugin</a> with a different easing animation for the page scrolling.</p>
<div class="post-box"><small>→ UItoTop: <a href="http://lab.mattvarone.com/projects/jquery/totop/">View the demo</a> | <a href="http://lab.mattvarone.com/projects/jquery/totop/jquery.ui.totop.zip">↓ Download</a> </small></div>
<p><span id="more-763"></span></p>
<h3>RELEASE NOTES</h3>
<p><strong>ver 1.1</strong> &#8211; Improvements to configuration conveniences. *<br />
<strong>ver 1.0</strong> &#8211; First Release.</p>
<p><em>* Big thanks to Rémy Tourbiez for this contribution to the code.</em></p>
<p>This is a post from: <a href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a href="http://www.mattvarone.com/web-design/uitotop-jquery-plugin/">UItoTop jQuery Plugin</a></p>

	<h4 class="related">Somewhat related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.mattvarone.com/wordpress/scrnshots-plugin-for-wordpress/" title="ScrnshotsRSS: Scrnshots.com Plugin For Wordpress (October 8, 2008)">ScrnshotsRSS: Scrnshots.com Plugin For Wordpress</a> (25)</li>
	<li><a href="http://www.mattvarone.com/wordpress/scrnshotsrss-plugin-update-2/" title="ScrnshotsRSS plugin 2.0 update (November 10, 2008)">ScrnshotsRSS plugin 2.0 update</a> (2)</li>
	<li><a href="http://www.mattvarone.com/icon/free-mini-calendar-icons-set/" title="Free Mini Calendar Icons Set (September 20, 2008)">Free Mini Calendar Icons Set</a> (9)</li>
	<li><a href="http://www.mattvarone.com/icon/free-daily-calendar-icons-set-for-css/" title="Free Daily Calendar Icons Set For CSS (September 22, 2008)">Free Daily Calendar Icons Set For CSS</a> (19)</li>
	<li><a href="http://www.mattvarone.com/wordpress/dynamic-to-top-wordpress-plugin/" title="Dynamic To Top WordPress Plugin (March 4, 2010)">Dynamic To Top WordPress Plugin</a> (11)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.mattvarone.com/web-design/uitotop-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>SimpleForm: Easy PHP multi-form email handler</title>
		<link>http://www.mattvarone.com/web-design/simpleform-php-email-script/</link>
		<comments>http://www.mattvarone.com/web-design/simpleform-php-email-script/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 18:49:46 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Web Design & Development]]></category>
		<category><![CDATA[FORMS]]></category>
		<category><![CDATA[MAIL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.mattvarone.com/?p=705</guid>
		<description><![CDATA[— It&#8217;s been a while, but today I am releasing a new version of my contact form script, this time under the name SimpleForm. It&#8217;s a nicer version of the previous one, re-written from the ground up and with a couple of new features. SimpleForm is basically meant to be an easy solution to handle [...]<p>This is a post from: <a href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a href="http://www.mattvarone.com/web-design/simpleform-php-email-script/">SimpleForm: Easy PHP multi-form email handler</a></p>
]]></description>
			<content:encoded><![CDATA[<p>— It&#8217;s been a while, but today I am releasing a new version of my <a href="http://www.mattvarone.com/web-design/php-contact-form-script/" title="contact form script" >contact form script</a>, this time under the name <strong>SimpleForm</strong>. It&#8217;s a nicer version of the previous one, re-written from the ground up and with a couple of new features. SimpleForm is basically meant to be an <strong>easy solution to handle one or many forms with little effort</strong>. It&#8217;s mainly focused on ease of use and rapid deployment.</p>
<p><img src="http://www.mattvarone.com/wp-content/uploads/2009/04/simpleform.jpg" alt="simpleform" title="simpleform" width="560" height="134" class="aligncenter border" /></p>
<p class="message-box info"> Current version: <strong>1.1.4</strong> <small>7/31/09</small>  </p>
<h4>These are a couple of it&#8217;s main features <strong>( ver. 1.1.4 )</strong>:</h4>
<p>* Multiform handler.<br />
* Support for required fields.<br />
* PHP <a href="http://www.linuxjournal.com/article/9585" title="email validation" >email validation</a>.<br />
* Unobtrusive JavaScript function to pre-check form data ( 4KB file ).<br />
* Lightweight, easy to use.<br />
* Multilingual support.<br />
* External configuration file that can reside outside the public folder.</p>
<div class="post-box"><small>→ SimpleForm: <a href="http://lab.mattvarone.com/demos/simpleform/">View the demo</a> | <a href="http://lab.mattvarone.com/demos/simpleform/multiple.php" title="Mutiple Forms">Mutiple Forms</a> | <a href="http://lab.mattvarone.com/demos/simpleform/simpleform.1.1.4.zip">↓ Download</a> </small></div>
<h3>HOW DOES IT WORKS?</h3>
<p>It&#8217;s very simple, first there is a configuration file where you define all of your website forms, by this I mean form title, form fields, form required fields and the location of each form. Then there are some snippets you have to add to your form page/s and thats all. SimpleForm takes care of pre-cheking the form fields with JS and then validating them with PHP, if it&#8217;s valid then it will send the email to the configured email address and return the user to the form page with a success message or otherwise, with an error message.</p>
<h3>INSTALLING THE SCRIPT</h3>
<h4>These are the necessary steps to have it up and running ( requires PHP 5 ):</h4>
<ol  class="normal">
<li><strong>Download</strong> <a href="http://lab.mattvarone.com/demos/simpleform/simpleform.1.1.4.zip">SimpleForm</a> ( ver 1.1.4 )</li>
<li><strong>Open sf-config.php</strong> and edit the necessary info.</li>
<li><strong>Upload sf-config.php</strong> to your host ( preferably outside the public folder ).</li>
<li>Open <strong>simpleform.php</strong> and edit the variable <em>$PATH_TO_CONFIG_FILE</em> ( on line 24 ) with the path from <em>simpleform.php</em> to <em>sf-config.php</em> ( leave empty if it resides on the same folder ).</li>
<li>Upload<strong> simpleform.php</strong>, <strong>simpleform.css</strong> and <strong>checkform.mini.js</strong> inside your public folder.</li>
<li>Open your form page/s and <strong>add the necessary code snippets</strong>.</li>
</ol>
<p><span id="more-705"></span></p>
<h3>EDITING THE CONFIGURATION FILE SF-CONFIG.PHP</h3>
<pre class="brush: php">
# ------------------------------------------------------------ #
// SIMPLEFORM CONFIGURATION								      //
# ------------------------------------------------------------ #

/* GENERAL CONFIGURATION
/////////////////////////////*/

// The name of the website/client. Example: &quot;My Website&quot;.
$aSettings[&quot;szFrom&quot;] = &quot;&quot;;							

// The email address that will receive the emails. Example: &quot;me@myemail.com&quot;.
$aSettings[&quot;szRecipient&quot;] = &quot;&quot;;		

/* The email address that will be used to send the emails. To work properly this has to be a real account
configured on the same server of the site. Example: &quot;noreply@mywebsite.com&quot;. */
$aSettings[&quot;szFromEmail&quot;] = &quot;&quot;;					    

/* FORMS CONFIGURATION
/////////////////////////////*/

/* The next step is to configure the Form/s.
   You can add as many as you want. */

$aForms = array(

	1 =&gt; array( 									// FORM ID: 1
		&quot;szFormTitle&quot; =&gt; &quot;&quot;,						// FORM TITLE - Example: &quot;Contact Form&quot;
		&quot;szFormURL&quot; =&gt; &quot;&quot;,							// FORM URL ( users will be redirected to this page )
		&quot;szFormRequired&quot; =&gt; array(					/* REQUIRED FIELDS ( array of name attributes ) */
			&quot;name&quot;,
			&quot;email&quot;,
		),
		&quot;aFormFields&quot; =&gt; array( 					/* LIST OF FORM FIELDS AND THEIR OUTPUT NAME
 													  All input fields coming from the form should go here.
													  The first value is the name attribute used and the second value
													  on the right the name displayed on the outputed data.

													  Any required field that contains the word &quot;email&quot; will have
													  it&quot;s value validated as an email address. */
		   	&quot;name&quot; =&gt; &quot;First Name&quot;,
			&quot;email&quot; =&gt; &quot;E-mail&quot;,
			&quot;work_email&quot; =&gt; &quot;Work Email&quot;,
			&quot;phone&quot; =&gt; &quot;Telephone&quot;,
			&quot;-sep1&quot; =&gt; &quot;This is a separator&quot;,		/* This is a separator. Any variable starting with the sign &quot;-&quot;
														will act as a content separator. */
			&quot;color&quot; =&gt; &quot;Color Option&quot;,
			&quot;comments&quot; =&gt; &quot;Comments&quot;,
			&quot;-sep2&quot; =&gt; &quot;This is Another separator&quot;,
			&quot;newsletter&quot; =&gt; &quot;Subscribe to our Newsletter?&quot;,
			&quot;interested[]&quot; =&gt; &quot;Im interested in&quot;,
			/* add more */
			)
	),

	2 =&gt; array(										/* Form 2. Same as above */
		&quot;szFormTitle&quot; =&gt; &quot;&quot;,
		&quot;szFormRequired&quot; =&gt; array(),
		&quot;szFormURL&quot; =&gt; &quot;&quot;,
		&quot;aFormFields&quot; =&gt; array(
			/* add more */
			)
	),

	3 =&gt; array(										/* Form 3. Same as above */
		&quot;szFormTitle&quot; =&gt; &quot;&quot;,
		&quot;szFormRequired&quot; =&gt; array(),
		&quot;szFormURL&quot; =&gt; &quot;&quot;,
		&quot;aFormFields&quot; =&gt; array(
			/* add more */
			)
		),

	/* add more */
);

/* RESPONSE CONFIGURATION
/////////////////////////////*/

/* Response Messages: These are the variables that hold the messages
the system prints as response. You can modify them to suit your project needs. */

 // Form has been sent.
$aSettings[&quot;aMessages&quot;][&quot;szSubmitSucess&quot;]  = &quot;Your message has been sent succesfully. Thanks!&quot;;
// Missing fields.
$aSettings[&quot;aMessages&quot;][&quot;szMissingFields&quot;] = &quot;Please complete all required fields.&quot;;
// Unvalid email address.
$aSettings[&quot;aMessages&quot;][&quot;szUnvalidEmail&quot;]  = &quot;Please insert a valid email address.&quot;;
// Email not sent by system error.
$aSettings[&quot;aMessages&quot;][&quot;szSystemError&quot;]   = &quot;There was an error in the system. Please try again later. Thanks!&quot;;

/* ADVANCED CONFIGURATION
/////////////////////////////*/

// Name of the GET variable to pass response messages
define( &quot;GET_NAME&quot;, &quot;response&quot;);
// Debug mode ( prints email content, and system errors )
define( &quot;DEBUG_MODE&quot; , false );
/* Check if the domain of the submited email addresses exists.
False by default as it may bring problems with some servers. ) */
define( &quot;CHECK_EMAIL_ADDRESS_DNS&quot; , false );
</pre>
<h3>INTEGRATING SIMPLEFORM WITH YOUR FORMS</h3>
<p>Below you&#8217;ll find the things you need to do to your form page ( must be php file ) for SimpleForm to work. I also have included a full example at bottom.</p>
<h4>A. Add  Javascript and CSS files</h4>
<p>	Add <strong>simpleform.css</strong> and<strong> checkform.js</strong> ( or <strong>checkform.mini.js</strong> ) inside the <strong>&lt;head&gt;</strong> element:</p>
<pre class="brush: html">
	&lt;link rel=&quot;stylesheet&quot; href=&quot;simpleform.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;/&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;checkform.mini.js&quot;&gt;&lt;/script&gt;
	</pre>
<h4>B. Define the path to the config file and Include <strong>simpleform.php</strong> in the document ( before your form/s ):</h4>
<pre class="brush: php">
	&lt;?php
	define( &quot;CONFIG_PATH&quot;, &quot;place/here/the/path/to/sf-congif/dir/&quot; );
	require_once &quot;simpleform.php&quot;;
	$sForm = new simpleForm();
	?&gt;
	</pre>
<h4>C. Add SimpleForm <strong>Responses function</strong></h4>
<p>		   Prints the systems response and can reside anywhere on the document.</p>
<pre class="brush: php">
			&lt;?php
 		   	// Example: &lt;p class=&quot;message-box error&quot;&gt;Please insert a valid email address.&lt;/p&gt;
 		   	$sForm-&gt;handleMessage(); ?
 		   	&gt;
		</pre>
<p>Output example:
<p class="message-box error">Please insert a valid email address.</p>
<h4>D. Add SimpleForm <strong>Form function</strong></h4>
<p> This function generates the required hidden input fields for simpleForm to work. The value passed is the ID assigned to the current form in the configuration file. This function must reside in between the &lt;form&gt;&lt;/form&gt;  elements.</p>
<pre class="brush: php">
 &lt;?php
 //Prints necessary data for the form with the ID = 1
$sForm-&gt;printData(1);
?&gt;
</pre>
<h4>E. Edit the<strong> &lt;form&gt; attributes</strong>:</h4>
<p>	Point the form&#8217;s <em>action attribute</em> to <strong>simpleform.php</strong> and then add the <strong>checkform</strong> function to enable the js data pre-checking.</p>
<pre class="brush: html">

	&lt;form action=&quot;simpleform.php&quot; method=&quot;post&quot; onsubmit=&quot;return checkform(this)&quot;&gt;
</pre>
<p>	The <strong>checkform()</strong> function supports an optional string parameter which alters the text you<br />
want to display on the js alerts. The variable #name is provided as a wildcard for the field Name.</p>
<p>	<strong>Examples:</strong><br />
				&#8220;Please complete the field #name&#8221;<br />
				&#8220;The field #name is missing&#8221;<br />
				&#8220;Por Favor complete el campo #name&#8221;</p>
<pre class="brush: html">
				onsubmit=&quot;return checkform(this,&#039;The field #name is missing&#039;)&quot;
				</pre>
<h4>Full Example</h4>
<pre class="brush: php">
	&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
		&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
		&lt;head&gt;
			&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
			&lt;title&gt;SimpleForm Example&lt;/title&gt;
			&lt;link rel=&quot;stylesheet&quot; href=&quot;simpleform.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;/&gt;
			&lt;script type=&quot;text/javascript&quot; src=&quot;checkform.mini.js&quot;&gt;&lt;/script&gt;
		&lt;/head&gt;
		&lt;body&gt;

			&lt;?php
			define( &quot;CONFIG_PATH&quot;, &quot;../secure/&quot; );

			require_once &quot;simpleform.php&quot;;
			$sForm = new simpleForm();

			$sForm-&gt;handleMessage();
			?&gt;

			&lt;form action=&quot;simpleform.php&quot; method=&quot;post&quot; onsubmit=&quot;return checkform(this)&quot;&gt;
		 	&lt;fieldset&gt;
		 	&lt;?php $sForm-&gt;printData(1); ?&gt;
				&lt;legend&gt;Personal Details:&lt;/legend&gt;
		        &lt;label for=&quot;name&quot; &gt;Name&lt;/label&gt;
		        &lt;input name=&quot;name&quot; id=&quot;name&quot; type=&quot;text&quot; value=&quot;&quot; /&gt;
		        &lt;label for=&quot;email&quot;&gt;Email &lt;span class=&quot;required&quot;&gt;(required)&lt;/span&gt;&lt;/label&gt;
		        &lt;input name=&quot;email&quot; id=&quot;email&quot; type=&quot;text&quot; value=&quot;&quot; /&gt;
				&lt;label for=&quot;work_email&quot;&gt;Work Email&lt;/label&gt;
		        &lt;input name=&quot;work_email&quot; id=&quot;work_email&quot; type=&quot;text&quot; value=&quot;&quot; /&gt;
				&lt;label for=&quot;phone&quot;&gt;Telephone &lt;span class=&quot;required&quot;&gt;(required)&lt;/span&gt;&lt;/label&gt;
		        &lt;input name=&quot;phone&quot; id=&quot;phone&quot; type=&quot;text&quot; value=&quot;&quot; /&gt;
		        &lt;label for=&quot;color&quot;&gt;Color Options: &lt;span class=&quot;required&quot;&gt;(required)&lt;/span&gt;&lt;/label&gt;
		        &lt;select name=&quot;color&quot; id=&quot;color&quot;&gt;
					&lt;option value=&quot;-&quot;&gt;Choose a color&lt;/option&gt;
					&lt;option value=&quot;Red&quot;&gt;Red&lt;/option&gt;
					&lt;option value=&quot;Green&quot;&gt;Green&lt;/option&gt;
					&lt;option value=&quot;Blue&quot;&gt;Blue&lt;/option&gt;
				&lt;/select&gt;
		        &lt;label for=&quot;comments&quot;&gt;Comments&lt;/label&gt;
		        &lt;textarea name=&quot;comments&quot; id=&quot;comments&quot; rows=&quot;10&quot; cols=&quot;50&quot;&gt;&lt;/textarea&gt;
		        &lt;/fieldset&gt;
		        &lt;fieldset class=&quot;radio&quot;&gt;
		            &lt;legend&gt;Subscribe to our Newsletter? &lt;span class=&quot;required&quot;&gt;(required)&lt;/span&gt;&lt;/legend&gt;
		            &lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;newsletter&quot; value=&quot;Yes&quot; /&gt; Yes&lt;/label&gt;
		            &lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;newsletter&quot; value=&quot;No&quot; /&gt; No&lt;/label&gt;
		        &lt;/fieldset&gt;
				&lt;fieldset class=&quot;checkbox&quot;&gt;
		            &lt;legend&gt;Im interested in: &lt;span class=&quot;required&quot;&gt;(required)&lt;/span&gt;&lt;/legend&gt;
		            &lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;interested[]&quot; value=&quot;Arts&quot; /&gt; Arts&lt;/label&gt;
					&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;interested[]&quot; value=&quot;Science&quot; /&gt; Science&lt;/label&gt;
					&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;interested[]&quot; value=&quot;Sports&quot; /&gt; Sports&lt;/label&gt;
		        &lt;/fieldset&gt;

		        &lt;p&gt;&lt;button type=&quot;submit&quot;&gt;Submit this!&lt;/button&gt;&lt;/p&gt;
		    &lt;/form&gt;

		&lt;/body&gt;
		&lt;/html&gt;
</pre>
<div class="post-box"><small>→ SimpleForm: <a href="http://lab.mattvarone.com/demos/simpleform/">View the demo</a> | <a href="http://lab.mattvarone.com/demos/simpleform/multiple.php" title="Mutiple Forms">Mutiple Forms</a> | <a href="http://lab.mattvarone.com/demos/simpleform/simpleform.1.1.2.zip">↓ Download</a> </small></div>
<h3>RELEASE NOTES</h3>
<p><strong>ver 1.1.4</strong> &#8211; Another Email Bug fixed ( Courtesy of megabonez ).<br />
<strong>ver 1.1.3</strong> &#8211; Email Bug fixed ( Mayor thanks to Jim from <a href="http://www.cpscreative.com">cpscreative.com</a> ).<br />
<strong>ver 1.1.2</strong> &#8211; Minor Bugs fixed.<br />
<strong>ver 1.1.1</strong> &#8211; Optional Email DNS checking.<br />
<strong>ver 1.1</strong> &#8211; Easier path deployment, Configurable response variable name, Debug function and minor bug fixes.<br />
<strong>ver 1.0</strong> &#8211; First Release.</p>
<p>This is a post from: <a href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a href="http://www.mattvarone.com/web-design/simpleform-php-email-script/">SimpleForm: Easy PHP multi-form email handler</a></p>

	<h4 class="related">Somewhat related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.mattvarone.com/web-design/php-contact-form-script/" title="PHP Contact form script (September 16, 2008)">PHP Contact form script</a> (5)</li>
	<li><a href="http://www.mattvarone.com/wordpress/output-clean-valid-xhtml/" title="WordPress: Output Clean and Valid HTML Content (October 30, 2009)">WordPress: Output Clean and Valid HTML Content</a> (10)</li>
	<li><a href="http://www.mattvarone.com/web-design/ternary-conditionals-in-php/" title="Ternary Conditionals in PHP (October 25, 2008)">Ternary Conditionals in PHP</a> (5)</li>
	<li><a href="http://www.mattvarone.com/wordpress/scrnshotsrss-plugin-update-2/" title="ScrnshotsRSS plugin 2.0 update (November 10, 2008)">ScrnshotsRSS plugin 2.0 update</a> (2)</li>
	<li><a href="http://www.mattvarone.com/wordpress/query-multiple-meta-values/" title="Query Post And Pages With Multiple Meta Values (March 5, 2010)">Query Post And Pages With Multiple Meta Values</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.mattvarone.com/web-design/simpleform-php-email-script/feed/</wfw:commentRss>
		<slash:comments>54</slash:comments>
		</item>
		<item>
		<title>Clean And Accessible Form Foundation</title>
		<link>http://www.mattvarone.com/web-design/clean-accesible-form-foundation/</link>
		<comments>http://www.mattvarone.com/web-design/clean-accesible-form-foundation/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 20:15:35 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Web Design & Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[FORMS]]></category>
		<category><![CDATA[HTML and XHTML]]></category>

		<guid isPermaLink="false">http://www.mattvarone.com/?p=215</guid>
		<description><![CDATA[Last Update 7/3/10
— As soon as you drop tables you find that making nicely formated and accessible forms is not that simple. There are many discussed methods to achieve this and there will always be something to argue about them. Having said that I present you here with a solution that  in most of [...]<p>This is a post from: <a href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a href="http://www.mattvarone.com/web-design/clean-accesible-form-foundation/">Clean And Accessible Form Foundation</a></p>
]]></description>
			<content:encoded><![CDATA[<p class="message-box info">Last Update 7/3/10</p>
<p>— As soon as you drop tables you find that making nicely formated and accessible forms is not that simple. There are many discussed methods to achieve this and there will always be something to argue about them. Having said that I present you here with a solution that  in most of the cases works for me. I hope you find this useful.</p>
<div class="post-box"><small>→ Final product: <a href="http://lab.mattvarone.com/demos/clean-accessible-form/index.html">View the demo</a> | <a href="http://lab.mattvarone.com/demos/clean-accessible-form/demo-clean-form-mattvarone.com.zip">↓ Download</a> </small></div>
<h3>GOALS:</h3>
<p>There were a couple of things I had in mind when creating this form, first of all the code would have to be <strong>valid XHTML</strong>, clean semantic and well formated. This would need to have a good balance between <strong>accessibility and flexibility</strong> to make it <strong>portable</strong> and easy to style. This way you have more chances to easily copy and modify to adjust to different needs.<br />
<span id="more-215"></span></p>
<h3>The Markup:</h3>
<p>Beyond the input elements XHTML gives us a set of tags to build our forms in an accessible way. I like to use <em>Fieldsets</em>, <em>Legends</em> and <em>Labels</em>. To display nicely aligned radio and checkbox buttons I use classes in the fieldsets: <em>.checkbox</em> and <em>.radio</em>. If the form requires multiple colomun-aligned checkboxes or radio buttons I use the class <em>.multiple</em>. To style the overall form correctly I use the class <em>.cleanform</em>.</p>
<pre class="brush: xhtml">
&lt;form class=&quot;cleanform&quot; action=&quot;#&quot;&gt;
	&lt;fieldset&gt;
		&lt;legend&gt;Personal Details:&lt;/legend&gt;
		&lt;label for=&quot;name&quot; &gt;Name &lt;span class=&quot;required&quot;&gt;(required)&lt;/span&gt;&lt;/label&gt;
		&lt;input name=&quot;name&quot; id=&quot;name&quot; type=&quot;text&quot; value=&quot;Example text.&quot; /&gt;
		&lt;label for=&quot;email&quot;&gt;Email &lt;span class=&quot;required&quot;&gt;(required)&lt;/span&gt;&lt;/label&gt;
		&lt;input name=&quot;email&quot; id=&quot;email&quot; type=&quot;text&quot; value=&quot;Example text.&quot; /&gt;
		&lt;label for=&quot;inquiry&quot;&gt;Inquiry&lt;/label&gt;
		&lt;select name=&quot;inquiry&quot; id=&quot;inquiry&quot;&gt;
		&lt;option value=&quot;comment&quot;&gt;Comment&lt;/option&gt;
		&lt;option value=&quot;suggestion&quot;&gt;Suggestion&lt;/option&gt;
		&lt;option value=&quot;feedback&quot;&gt;Feedback&lt;/option&gt;
		&lt;/select&gt;
		&lt;label for=&quot;comments&quot;&gt;Comments&lt;/label&gt;
		&lt;textarea name=&quot;comments&quot; id=&quot;comments&quot; rows=&quot;10&quot; cols=&quot;50&quot;&gt;Example text.&lt;/textarea&gt;
	&lt;/fieldset&gt;
	&lt;fieldset class=&quot;radio&quot;&gt;
		&lt;legend&gt;Subscribe to my Newsletter? &lt;span class=&quot;required&quot;&gt;(required)&lt;/span&gt;&lt;/legend&gt;
		&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;newsletter&quot; value=&quot;Yes&quot; /&gt; Yes&lt;/label&gt;
		&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;newsletter&quot; value=&quot;No&quot; /&gt; No&lt;/label&gt;
		&lt;/fieldset&gt;
	&lt;fieldset class=&quot;checkbox&quot;&gt;
		&lt;legend&gt;Aditional information&lt;/legend&gt;
		&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;foo&quot; value=&quot;Foo yes&quot; /&gt; Foo&lt;/label&gt;
		&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;bar&quot; value=&quot;Bar yes&quot; /&gt; Bar&lt;/label&gt;
	&lt;/fieldset&gt;
	&lt;fieldset class=&quot;checkbox multiple&quot;&gt;
		&lt;legend&gt;Multiple Checkboxes&lt;/legend&gt;
		&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;foo2&quot; value=&quot;Foo yes&quot; /&gt; Foo&lt;/label&gt;
		&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;bar2&quot; value=&quot;Bar yes&quot; /&gt; Bar&lt;/label&gt;
		&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;foo3&quot; value=&quot;Foo yes&quot; /&gt; Other&lt;/label&gt;
		&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;bar3&quot; value=&quot;Bar yes&quot; /&gt; Example&lt;/label&gt;
		&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;foo4&quot; value=&quot;Foo yes&quot; /&gt; Multiple&lt;/label&gt;
		&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;bar4&quot; value=&quot;Bar yes&quot; /&gt; Checkboxes&lt;/label&gt;
		&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;foo5&quot; value=&quot;Foo yes&quot; /&gt; More&lt;/label&gt;
		&lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;bar5&quot; value=&quot;Bar yes&quot; /&gt; Select&lt;/label&gt;
	&lt;/fieldset&gt;

	&lt;p&gt;&lt;button type=&quot;submit&quot;&gt;Submit Form&lt;/button&gt;&lt;/p&gt;

&lt;/form&gt;
</pre>
<p>As you may see its a very simple and clean markup, I group related form elements in fieldsets and make use of the legend and label elements.</p>
<p>I also have the required labels. A common practice for this is to add an asterisk in red, I am not against that but I prefer to use the word &#8220;required&#8221; when possible. To achieve this I use the <em>span</em> element with a class named <em>.required</em>.</p>
<p>Optionally I add a little intro to make the form more intuitive:</p>
<pre class="brush: xhtml">
&lt;div class=&quot;formInfo&quot;&gt;
	&lt;h2&gt;Contact me Form&lt;/h2&gt;
	&lt;p&gt;Please complete the following form to reach me. Thank you!&lt;/p&gt;
&lt;/div&gt;
</pre>
<h3>The CSS</h3>
<p>CSS code for the <em>cleanform</em> class and its elements:</p>
<pre class="brush: css">
/* CLEAN FORM
/////////////////////////////*/

/* General */

.cleanform {
	font-size:1em;
	width:40em;
	color:#1b1b1b;
	text-align:left;
	margin:1em auto
}

/* Elements */

.cleanform  label,.cleanform legend{
	padding:0;
	margin:0.3em 0
}

.cleanform fieldset{
	padding:0.7em;
	border:1px solid #ddd;
	margin:0 0 0.5em 0
}

.cleanform label {
	font-weight:bold
}

.cleanform fieldset input {
	width:70%;
	line-height:1.5em;
	padding:0.15em
}

.cleanform .radio input,
.cleanform .checkbox input {
	width:auto;
	border:none;
	margin:0 1.5em 0 0
}

.cleanform input, .cleanform textarea, .cleanform select {
	display:block;
	margin-bottom:1em;
	font-size:1em;
	border:1px solid #bbb;
	padding:0.15em;
	margin-right:1em
}

.cleanform .radio label, .cleanform .radio input,
.cleanform .checkbox label, .cleanform .checkbox input {
	display:inline;
	margin:0 1.5em 0 0
}

.cleanform .radio input, .cleanform .checkbox input {
	margin:0 0.3em 0 0
}

.cleanform .multiple label{
	float:left;
	width:29%;
	overflow:hidden;
	padding-left:1px
}

.cleanform .multiple input {
	cursor:pointer
}

/* Button */

.cleanform button {
	margin:0.3em 0;
	border:1px solid #ccc;
	background-color:#eee;
	font-size:1em;
	cursor:pointer;
	padding:0.5em
}

.cleanform button:hover {
	background-color:#e6efc2;
	border:1px solid #c6d880;
	color:#529214
}

.cleanform button:active {
	background-color:#333;
	color:white;
	border:1px solid #000
}

/* information */

.cleanform .formInfo {
	margin-bottom:1em;
	padding-bottom:0.5em;
	border-bottom:0.1em solid #ddd
}

.cleanform .formInfo h2 {
	color:#00889e;
	font-weight:bold;
	font-size:1.2em;
	margin-bottom:1em
}

.cleanform .formInfo p{
	text-align:justify
}

.cleanform .required {
	color:#ff3838;
	font-weight:bold;
	font-size:0.8em
}
</pre>
<p>With the styles above you have a clean, accessible and valid foundation from where you can style the form accordingly to your project needs.</p>
<div class="post-box"><small>→ Final product: <a href="http://lab.mattvarone.com/demos/clean-accessible-form/index.html">View the demo</a> | <a href="http://lab.mattvarone.com/demos/clean-accessible-form/demo-clean-form-mattvarone.com.zip">↓ Download</a> </small></div>
<h3>Conclusion</h3>
<p>I hope you found it useful and of course I suggest you to always choose the method/solution that you feel most comfortable with. Critics and comments are welcomed,<br />
Cheers!</p>
<p><small><em>This method has been tested in: IE6, IE7, Firefox 3 ( Mac &amp; PC ), Google Chrome, Opera ( Win )  and Safari 3.1.</em></small></p>
<p>This is a post from: <a href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a href="http://www.mattvarone.com/web-design/clean-accesible-form-foundation/">Clean And Accessible Form Foundation</a></p>

	<h4 class="related">Somewhat related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.mattvarone.com/web-design/css-navigation-generator/" title="From the lab: CSS Navigation Bar Code Generator (December 16, 2008)">From the lab: CSS Navigation Bar Code Generator</a> (11)</li>
	<li><a href="http://www.mattvarone.com/web-design/daily-calendar-dates-with-css/" title="Daily Calendar Dates With CSS (September 23, 2008)">Daily Calendar Dates With CSS</a> (6)</li>
	<li><a href="http://www.mattvarone.com/web-design/css-text-based-navigation-bar-with-images/" title="CSS Text based navigation bar with images (June 27, 2008)">CSS Text based navigation bar with images</a> (39)</li>
	<li><a href="http://www.mattvarone.com/wordpress/output-clean-valid-xhtml/" title="WordPress: Output Clean and Valid HTML Content (October 30, 2009)">WordPress: Output Clean and Valid HTML Content</a> (10)</li>
	<li><a href="http://www.mattvarone.com/web-design/simpleform-php-email-script/" title="SimpleForm: Easy PHP multi-form email handler (April 16, 2009)">SimpleForm: Easy PHP multi-form email handler</a> (54)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.mattvarone.com/web-design/clean-accesible-form-foundation/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>From the lab: CSS Navigation Bar Code Generator</title>
		<link>http://www.mattvarone.com/web-design/css-navigation-generator/</link>
		<comments>http://www.mattvarone.com/web-design/css-navigation-generator/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 18:18:23 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Web Design & Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML and XHTML]]></category>
		<category><![CDATA[LAYOUT]]></category>
		<category><![CDATA[NAVIGATION BARS]]></category>

		<guid isPermaLink="false">http://www.mattvarone.com/?p=636</guid>
		<description><![CDATA[
— This web tool will help you generate the code you need to build a navigation bar with the technique described in this article: CSS Text based navigation bar with images.
The result is a valid and accessible text based imaged navigation bar with one sprite image, XHTML and CSS. I have included a short video [...]<p>This is a post from: <a href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a href="http://www.mattvarone.com/web-design/css-navigation-generator/">From the lab: CSS Navigation Bar Code Generator</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a title="CSS Navigation Bar Code Generator" href="http://lab.mattvarone.com/navbar/"><img class="border aligncenter size-full" title="CSS Navigation Bar Code Generator" src="http://www.mattvarone.com/wp-content/uploads/2008/12/cssnavbar.jpg" alt="CSS Navigation Bar Code Generator" width="560" height="320" /></a></p>
<p>— This web tool will help you generate the code you need to build a navigation bar with the technique described in this article: <a href="http://www.mattvarone.com/web-design/css-text-based-navigation-bar-with-images/">CSS Text based navigation bar with images</a>.</p>
<p>The result is a valid and accessible text based imaged navigation bar with one sprite image, XHTML and CSS. I have included a <a href="http://lab.mattvarone.com/navbar/video.html">short video</a> as well to showcase the process.</p>
<div class="post-box"><small>→ <a href="http://lab.mattvarone.com/navbar/">CSS Navigation Bar Code Generator</a></small></div>
<p>Please let me know if you have any comment. You can download the generated code in a zip file.</p>
<p>Hope you find it useful. Enjoy!</p>
<p>This is a post from: <a href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a href="http://www.mattvarone.com/web-design/css-navigation-generator/">From the lab: CSS Navigation Bar Code Generator</a></p>

	<h4 class="related">Somewhat related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.mattvarone.com/web-design/css-text-based-navigation-bar-with-images/" title="CSS Text based navigation bar with images (June 27, 2008)">CSS Text based navigation bar with images</a> (39)</li>
	<li><a href="http://www.mattvarone.com/web-design/daily-calendar-dates-with-css/" title="Daily Calendar Dates With CSS (September 23, 2008)">Daily Calendar Dates With CSS</a> (6)</li>
	<li><a href="http://www.mattvarone.com/web-design/clean-accesible-form-foundation/" title="Clean And Accessible Form Foundation (January 8, 2009)">Clean And Accessible Form Foundation</a> (38)</li>
	<li><a href="http://www.mattvarone.com/wordpress/output-clean-valid-xhtml/" title="WordPress: Output Clean and Valid HTML Content (October 30, 2009)">WordPress: Output Clean and Valid HTML Content</a> (10)</li>
	<li><a href="http://www.mattvarone.com/web-design/message-box-with-css/" title="Message Boxes with CSS (July 25, 2008)">Message Boxes with CSS</a> (10)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.mattvarone.com/web-design/css-navigation-generator/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Ternary Conditionals in PHP</title>
		<link>http://www.mattvarone.com/web-design/ternary-conditionals-in-php/</link>
		<comments>http://www.mattvarone.com/web-design/ternary-conditionals-in-php/#comments</comments>
		<pubDate>Sat, 25 Oct 2008 21:34:17 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Web Design & Development]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.mattvarone.com/?p=531</guid>
		<description><![CDATA[— Ternary Conditionals are one of those things in php that can save some time when writing code and possibly make your code easier to read. I think many people don’t use them because they look a little strange ( at least thats what happened to me ).

if ($iExample == 1)
{
    $bVariable [...]<p>This is a post from: <a href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a href="http://www.mattvarone.com/web-design/ternary-conditionals-in-php/">Ternary Conditionals in PHP</a></p>
]]></description>
			<content:encoded><![CDATA[<p>— Ternary Conditionals are one of those things in php that can save some time when writing code and possibly make your code easier to read. I think many people don’t use them because they look a little strange ( at least thats what happened to me ).</p>
<pre class="brush: php">
if ($iExample == 1)
{
    $bVariable = true;
}
else
{
    $bVariable = false;
}
</pre>
<p>In the example above, if the statement is true then, it will set $bVariable to true or else it will set it to false. This is a regular conditional statement where if a condition is true something happens or else (if the condition is false) other thing happen. Conditional statements like that could be easily handled with a ternary conditional:</p>
<pre class="brush: php">
$bVariable = ($iExample == 1) ? true : false;
</pre>
<p>As you can see the syntax of the Ternary Conditional is pretty simple and looks good as its fits all in one line.</p>
<pre class="brush: php">
Variable = (condition) ?  its true : its false;
</pre>
<p>I hope you find this post useful, Cheers!</p>
<p>This is a post from: <a href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a href="http://www.mattvarone.com/web-design/ternary-conditionals-in-php/">Ternary Conditionals in PHP</a></p>

	<h4 class="related">Somewhat related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.mattvarone.com/wordpress/output-clean-valid-xhtml/" title="WordPress: Output Clean and Valid HTML Content (October 30, 2009)">WordPress: Output Clean and Valid HTML Content</a> (10)</li>
	<li><a href="http://www.mattvarone.com/web-design/simpleform-php-email-script/" title="SimpleForm: Easy PHP multi-form email handler (April 16, 2009)">SimpleForm: Easy PHP multi-form email handler</a> (54)</li>
	<li><a href="http://www.mattvarone.com/wordpress/scrnshotsrss-plugin-update-2/" title="ScrnshotsRSS plugin 2.0 update (November 10, 2008)">ScrnshotsRSS plugin 2.0 update</a> (2)</li>
	<li><a href="http://www.mattvarone.com/wordpress/query-multiple-meta-values/" title="Query Post And Pages With Multiple Meta Values (March 5, 2010)">Query Post And Pages With Multiple Meta Values</a> (3)</li>
	<li><a href="http://www.mattvarone.com/web-design/php-contact-form-script/" title="PHP Contact form script (September 16, 2008)">PHP Contact form script</a> (5)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.mattvarone.com/web-design/ternary-conditionals-in-php/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Daily Calendar Dates With CSS</title>
		<link>http://www.mattvarone.com/web-design/daily-calendar-dates-with-css/</link>
		<comments>http://www.mattvarone.com/web-design/daily-calendar-dates-with-css/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 14:58:07 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Web Design & Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML and XHTML]]></category>
		<category><![CDATA[INTERFACE DESIGN]]></category>
		<category><![CDATA[LAYOUT]]></category>
		<category><![CDATA[STYLE SHEET]]></category>

		<guid isPermaLink="false">http://www.mattvarone.com/?p=329</guid>
		<description><![CDATA[— Now that I released the calendar icons set I thought of sharing the CSS technique I use to display dates within the calendars. This practice is seen mostly across blogs and news articles sites. We have specific images for each month so the technique is pretty simple, let&#8217;s start with the base XHTML:

→ Final [...]<p>This is a post from: <a href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a href="http://www.mattvarone.com/web-design/daily-calendar-dates-with-css/">Daily Calendar Dates With CSS</a></p>
]]></description>
			<content:encoded><![CDATA[<p>— Now that I released the calendar icons set I thought of sharing the CSS technique I use to display dates within the calendars. This practice is seen mostly across blogs and news articles sites. We have <a href="http://www.mattvarone.com/2008/09/free-daily-calendar-icons-set-for-css/">specific images for each month</a> so the technique is pretty simple, let&#8217;s start with the base XHTML:</p>
<p><img src="http://www.mattvarone.com/wp-content/uploads/2008/09/dates1.jpg" alt="CSS Dates" title="dates" width="326" height="113" class="aligncenter border" /></p>
<div class="post-box"><small>→ Final product: <a href="http://lab.mattvarone.com/demos/daily-calendar-dates-css/index.html">view a demo</a> | <a href="http://lab.mattvarone.com/demos/daily-calendar-dates-css/004-demo-daily-calendar-dates-css-mattvarone.com.zip">↓ Download Technique</a> </small></div>
<h3>PREPARING THE XHTML</h3>
<p>I&#8217;m gonna simulate we are doing this for a blog:</p>
<pre class="brush: css">
&lt;div class=&quot;post&quot;&gt;

     &lt;div class=&quot;date month-09&quot;&gt;10th&lt;/div&gt;
     &lt;h2&gt;This is my Post Title&lt;/h2&gt;        

     &lt;div class=&quot;entry&quot;&gt;
             &lt;p&gt;&amp;amp;amp;mdash;  Lorem ipsum dolor sit amet, consectetur...&lt;/p&gt;
     &lt;/div&gt;

&lt;/div&gt;
</pre>
<p><span id="more-329"></span></p>
<p>Note that I added a <em>.month-09</em> class to the date div. In most common scenarios this class would come from a CMS or <a href="http://www.php.net/date">PHP</a> function and eventually help to style the div with the correct month background image:</p>
<h3>The CSS</h3>
<pre class="brush: css">
.date {
    float:left;
    display:block;
    font-size:11px;
    text-align:center;
    line-height:45px;
    width:32px;
    height:45px
}

.date.month-01 { background: url(images/jan.gif) no-repeat 0 0 }
.date.month-02 { background: url(images/feb.gif) no-repeat 0 0 }
.date.month-03 { background: url(images/mar.gif) no-repeat 0 0 }
.date.month-04 { background: url(images/apr.gif) no-repeat 0 0 }
.date.month-05 { background: url(images/may.gif) no-repeat 0 0 }
.date.month-06 { background: url(images/jun.gif) no-repeat 0 0 }
.date.month-07 { background: url(images/jul.gif) no-repeat 0 0 }
.date.month-08 { background: url(images/aug.gif) no-repeat 0 0 }
.date.month-09 { background: url(images/sep.gif) no-repeat 0 0 }
.date.month-10 { background: url(images/oct.gif) no-repeat 0 0 }
.date.month-11 { background: url(images/nov.gif) no-repeat 0 0 }
.date.month-12 { background: url(images/dec.gif) no-repeat 0 0 }
</pre>
<p>The CSS above is pretty clear, first I float the div with the <em>.date</em> class, display it as a block and apply desired dimensions and font size. Then, as mentioned before, I assign the correct background image based on the month number class.</p>
<h3>WORDPRESS</h3>
<p>If you are using WordPress you can use <em>the_time()</em> function to get the correct date and month to display:</p>
<pre class="brush: php">
&lt;div class=&quot;post&quot;&gt;

        &lt;div class=&quot;date month-&lt;?php the_time(&#039;m&#039;); ?&gt;&quot;&gt;&lt;?php the_time(&#039;dS&#039;); ?&gt;&lt;/div&gt;
        &lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;

        &lt;div class=&quot;entry&quot;&gt;
            &lt;?php the_content(); ?&gt;
        &lt;/div&gt;

&lt;/div&gt;
</pre>
<h3>Conclusion</h3>
<p>And thats it! Simple technique that looks good. I hope you find the article useful, Cheers!</p>
<div class="post-box"><small>→ Final product: <a href="http://lab.mattvarone.com/demos/daily-calendar-dates-css/index.html">view a demo</a> | <a href="http://lab.mattvarone.com/demos/daily-calendar-dates-css/004-demo-daily-calendar-dates-css-mattvarone.com.zip">↓ Download Technique</a> </small></div>
<p><small><em>This technique has been tested in:<br />
 IE6, IE7, Firefox 3 ( Mac/PC ), Google Chorme ( Win ) and Safari ( Mac/PC ).</em></small></p>
<p>This is a post from: <a href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a href="http://www.mattvarone.com/web-design/daily-calendar-dates-with-css/">Daily Calendar Dates With CSS</a></p>

	<h4 class="related">Somewhat related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.mattvarone.com/web-design/css-navigation-generator/" title="From the lab: CSS Navigation Bar Code Generator (December 16, 2008)">From the lab: CSS Navigation Bar Code Generator</a> (11)</li>
	<li><a href="http://www.mattvarone.com/web-design/css-text-based-navigation-bar-with-images/" title="CSS Text based navigation bar with images (June 27, 2008)">CSS Text based navigation bar with images</a> (39)</li>
	<li><a href="http://www.mattvarone.com/web-design/message-box-with-css/" title="Message Boxes with CSS (July 25, 2008)">Message Boxes with CSS</a> (10)</li>
	<li><a href="http://www.mattvarone.com/wordpress/dynamic-to-top-wordpress-plugin/" title="Dynamic To Top WordPress Plugin (March 4, 2010)">Dynamic To Top WordPress Plugin</a> (11)</li>
	<li><a href="http://www.mattvarone.com/web-design/css-reusable-classes/" title="CSS Reusable Classes (July 1, 2008)">CSS Reusable Classes</a> (7)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.mattvarone.com/web-design/daily-calendar-dates-with-css/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
