<?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>A Blog for Web People &#187; Web Development</title>
	<atom:link href="http://www.pat-burt.com/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pat-burt.com</link>
	<description>Patrick Burt</description>
	<lastBuildDate>Wed, 17 Aug 2011 16:26:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Portfolio Site Redesign</title>
		<link>http://www.pat-burt.com/web-development/portfolio-site-redesign/</link>
		<comments>http://www.pat-burt.com/web-development/portfolio-site-redesign/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 20:13:25 +0000</pubDate>
		<dc:creator>Patrick Burt</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.pat-burt.com/?p=267</guid>
		<description><![CDATA[My portfolio has recently undergone a slight redesign. It wasn&#8217;t all that complicated given that there were only 3 pages. What was important in the process of the redesign was to understand why I was doing it, and to establish what goals I had. Why was I was doing it? Like most redesigns, the design [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Patrick Burt's Portfolio" href="http://www.oildrip.com/">My portfolio</a> has recently undergone a slight redesign. It wasn&#8217;t all that complicated given that there were only 3 pages. What was important in the process of the redesign was to understand why I was doing it, and to establish what goals I had. Why was I was doing it? Like most redesigns, the design was getting stale, it had probably been over 4 years since my portfolio&#8217;s site has been visisted, and trends have changed since then. As for my goals, they were as follows:</p>
<h2>Retain Domain Name and Page Equity</h2>
<p>My portfolio site ranks very highly for keywords, specifically, Patrick Burt and Graphic Designer. This can all be thrown away if I decide to rewrite things or get rid of my already valuable links. Using the same, pre-redesign, URLs has allowed me to leverage pre-existing PageRank towards my new content. I also made sure to use similar content, titles and metadata that had gotten me high on Search Engine Result Pages (SERPs).</p>
<h2>Dropping Flash and Using More Javascript</h2>
<p>Adobe Flash does not degrade very well in the event that a user does not have Javascript or Flash. If I had to guess, I say that Flash&#8217;s inaccessibility is proportional to the surge in use of mobile devices as Web browsers.</p>
<p>Given the advances in the Javascript world with such libraries as jQuery and script.aculo.us and with HTML5 on the horizon, some might say Flash is falling behind. With Javascript, however, comes the responsibility to ensure that user or browsers without Javascript are still given a satisfying experience.</p>
<h2>Social Media Presence</h2>
<p>I don&#8217;t think anyone can disagree that Social Media is here to stay. I&#8217;d have to say it&#8217;s as transparent as listing your phone number on your Web site. You create a human connection. You are more than simply an anonymous user or company sitting behind a screen.</p>
<div><a rel="nofollow" href="http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Fwww.pat-burt.com%2Fweb-development%2Fportfolio-site-redesign%2F&amp;title=Portfolio+Site+Redesign"  title="Bookmark this blog using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="Bookmark this blog using any bookmark manager!" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pat-burt.com/web-development/portfolio-site-redesign/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Download a PHP Form Creation/Validation Framework</title>
		<link>http://www.pat-burt.com/web-development/download-a-php-form-creationvalidation-framework/</link>
		<comments>http://www.pat-burt.com/web-development/download-a-php-form-creationvalidation-framework/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 03:45:14 +0000</pubDate>
		<dc:creator>Patrick Burt</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.pat-burt.com/?p=259</guid>
		<description><![CDATA[Call it a toolkit, call it a library, whatever it is, over the years, I have perfected a PHP Form Creation and Validation Framework. It contains various functions needed to create all form entry elements and easy-to-use functions to validate them correctly. Here&#8217;s a list of features: Functions Easily create labels, text fields, checkboxes, radio [...]]]></description>
			<content:encoded><![CDATA[<p>Call it a toolkit, call it a library, whatever it is, over the years, I have perfected a <strong>PHP Form Creation and Validation Framework</strong>. It contains various functions needed to create all form entry elements and easy-to-use functions to validate them correctly. Here&#8217;s a list of features:</p>
<h2>Functions</h2>
<ul>
<li>Easily create labels, text fields, checkboxes, radio buttons, textareas, etc.</li>
<li>Validate empty fields, number ranges, checkboxes, string length, emails, postal codes, phone numbers, and dates</li>
<li>Display a compiled list of <strong>all errors</strong> with the form if they exist.</li>
<li>Change the color of labels that contain erroneous data.</li>
</ul>
<h2>Other Goodies/Features</h2>
<ul>
<li>Validates with W3C</li>
<li>Supports two languages (currently has French and English error messages)</li>
<li>Other functions including string shorteners, easy redirects, HTML emails, etc.</li>
<li>English and French vocabulary</li>
<li>Easy-to-understand function names and comments</li>
</ul>
<p><a title="PHP Form Creation and Validation Framework" href="http://www.pat-burt.com/phpBase.zip">Download it here</a>.</p>
<div><a rel="nofollow" href="http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Fwww.pat-burt.com%2Fweb-development%2Fdownload-a-php-form-creationvalidation-framework%2F&amp;title=Download+a+PHP+Form+Creation%2FValidation+Framework"  title="Bookmark this blog using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="Bookmark this blog using any bookmark manager!" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pat-burt.com/web-development/download-a-php-form-creationvalidation-framework/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Auto-Generating ALT Tags with Dreamweaver</title>
		<link>http://www.pat-burt.com/web-development/auto-generating-alt-tags-with-dreamweaver/</link>
		<comments>http://www.pat-burt.com/web-development/auto-generating-alt-tags-with-dreamweaver/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 15:11:03 +0000</pubDate>
		<dc:creator>Patrick Burt</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.pat-burt.com/web-development/auto-generating-alt-tags-with-dreamweaver/</guid>
		<description><![CDATA[What I had on my hands were a bunch of HTML files. Each of these HTML files had pictures, and I&#8217;m damn sure a lot of them didn&#8217;t have ALT tags, something essential for accessibility (and also helps with SEO). Using Adobe Dreamweaver (and possibly Macromedia versions of Dreamweaver), you can do searches and find [...]]]></description>
			<content:encoded><![CDATA[<p>What I had on my hands were a bunch of HTML files. Each of these HTML files had pictures, and I&#8217;m damn sure a lot of them didn&#8217;t have ALT tags, something essential for accessibility (and also helps with SEO). Using Adobe Dreamweaver (and possibly Macromedia versions of Dreamweaver), you can do <strong>searches</strong> and <strong>find and replaces</strong> with <strong>regular expression</strong> (regex). What you do is throw open Dreamweaver, hit Ctrl-F. At the bottom of the search window, there&#8217;s a checkbox for <em>Use regular expression</em>, check that and we&#8217;re ready to go.</p>
<h2>Finding Images Without Alt Tags</h2>
<p>I did some internet sleuthing and found the following code to search for images without ALT tags:</p>
<p><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script></p>
<p><em>&lt;img((?:(?!alt)[^&lt;&gt;])*)&gt;</em></p>
<p>What it does is search for &#8220;&lt;img&#8221;, and then the next &#8220;&gt;&#8221; that occurs, hopefully the end of your image tag. it then checks for the phrase &#8220;alt&#8221; anywhere in there to find an alt tag. The downside, is that if you&#8217;re image HTML looks like this:</p>
<p><em>&lt;img src=&#8221;malt.jpg&#8221; /&gt;</em></p>
<p>Dreamweaver won&#8217;t pick up on it. That&#8217;s something I&#8217;ll look into if I revise the code, but I wasn&#8217;t working on a beer website so I didn&#8217;t think it was going to be a problem.</p>
<h2>Auto-Generating ALT Tags</h2>
<p>Because it&#8217;s impossible to give an accurate description of each of the 400 images without consuming a lot of time, what we&#8217;re going to do is base the ALT tag on the file name.</p>
<p>Here is the FIND field:<br />
<em>&lt;img src=&#8221;(.*?)(.gif|.jpg|.jpeg|.png|.GIF|.JPG|.JPEG|.PNG)((?:(?!alt)[^&lt;&gt;])*)&gt;</em></p>
<p>Here is the REPLACE WITH field:<br />
<em>&lt;img src=&#8221;$1$2&#8243; alt=&#8221;$1$3&gt;</em></p>
<p>What&#8217;s happening here? You&#8217;ll seethat we&#8217;re checking for the existence of the &#8220;alt&#8221; tag once again, but we&#8217;re also breaking down the image tag down. Each section to be broken down is within parentheses. The first chunk is the image&#8217;s source, then the image&#8217;s extension and then the last chunk before the end (that doesn&#8217;t contain an alt tag). For example:</p>
<p><em>&lt;img src=&#8221;myDogShelby.jpg&#8221; border=&#8221;0&#8243; height=&#8221;300&#8243; /&gt;</em><br />
becomes<br />
<em><strong>&lt;img src=&#8221;</strong>||||PART 1: <strong>myDogShelby</strong>||||PART 2: <strong>.jpg</strong>||||PART 3:<strong>  border=&#8221;0&#8243; height=&#8221;300&#8243; /</strong>||||<strong>&gt;</strong></em></p>
<p>Then what we&#8217;re doing is reconstructing the image link as follows:</p>
<p><em>&lt;img src=&#8221;myDogShelby.jpg&#8221; alt=&#8221;myDogShelby&#8221;  </em><em>  border=&#8221;0&#8243; height=&#8221;300&#8243; /&gt;</em></p>
<p>Simple? I thought so.</p>
<h2>Finishing Touches</h2>
<p>What happens when using this technique is that you&#8217;re also throwing the path into the ALT tag:</p>
<p><em>&lt;img src=&#8221;images/shelby.jpg&#8221; /&gt;</em><br />
becomes<br />
<em>&lt;img src=&#8221;images/shelby.jpg&#8221; alt=&#8221;images/shelby.jpg&#8221; /&gt;</em></p>
<p>This is an easy fix, simply do a global search and replace. Replace:</p>
<p><em>alt=&#8221;images/</em><br />
with<br />
<em>alt=&#8221;</em></p>
<p>Easy peasy, japaneasy. This is pretty straight-forward, hope that helps and saves you oodles of time.</p>
<div><a rel="nofollow" href="http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Fwww.pat-burt.com%2Fweb-development%2Fauto-generating-alt-tags-with-dreamweaver%2F&amp;title=Auto-Generating+ALT+Tags+with+Dreamweaver"  title="Bookmark this blog using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="Bookmark this blog using any bookmark manager!" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pat-burt.com/web-development/auto-generating-alt-tags-with-dreamweaver/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>What You Need To Know About SQL Injection</title>
		<link>http://www.pat-burt.com/web-development/what-you-need-to-know-about-sql-injection/</link>
		<comments>http://www.pat-burt.com/web-development/what-you-need-to-know-about-sql-injection/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 19:21:45 +0000</pubDate>
		<dc:creator>Patrick Burt</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.pat-burt.com/web-development/what-you-need-to-know-about-sql-injection/</guid>
		<description><![CDATA[Having seeing the effects of an SQL Injection attack, I thought I&#8217;d be able to tackle some tips on preventing SQL Injections in the first place. All it takes is one vulnerability to affect your entire software application. If the vulnerability is general enough, you could be the target of scripts that scour the web [...]]]></description>
			<content:encoded><![CDATA[<p>Having seeing the effects of an SQL Injection attack, I thought I&#8217;d be able to tackle some tips on preventing SQL Injections in the first place.<br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script><br />
All it takes is one vulnerability to affect your entire software application. If the vulnerability is general enough, you could be the target of scripts that scour the web autonomously attempting to inject websites. Let&#8217;s get right into some tips:</p>
<h2>Validate Anything That Comes In Via Querystring</h2>
<p>Although you may expect your query string to do something simple in your application, it can provide hackers with a intrusion point.  Example:</p>
<p><em>http://www.pat-burt.com/somePage.php?error=1</em></p>
<p>I use the querystring to provide me with a 1 or a 0. But don&#8217;t expect hackers to only provide you with a 1 or a 0. Let&#8217;s say you&#8217;re using the result of the value &#8220;error&#8221; in your SQL statement:</p>
<p><em>UPDATE userStatus SET error=<strong>1</strong> WHERE  userID=248</em></p>
<p>You can see how the hacker can change the error value to something malicious directly in the address bar to manipulate your SQL statement to their advantage in the following example.  It wouldn&#8217;t take much to change the query string to produce the following SQL statement:</p>
<p><em>UPDATE userStatus SET error=<strong>1; UPDATE SET password=&#8217;HACKED&#8217;</strong> WHERE userID=248</em></p>
<p>What you&#8217;d need to do is strip characters or convert the query string&#8217;s result to an integer (in this case). If you&#8217;re expecting either of those values, check for either of those values before anything goes into your query string.</p>
<h2>Validate Anything Posted to a Form</h2>
<p>Info posted from a form should also be validated. Keep in mind that forms can be posted to without even viewing the actual form. That means your form validation needs to go beyond using HTML to put a limit on the number of characters in your text field. Using the programming language of your choice, you should validate input based on:</p>
<ul>
<li>Length</li>
<li>Illegal characters</li>
<li>Type of input (integers, phone numbers, text)</li>
</ul>
<p>Hope that helps. <img src='http://www.pat-burt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div><a rel="nofollow" href="http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Fwww.pat-burt.com%2Fweb-development%2Fwhat-you-need-to-know-about-sql-injection%2F&amp;title=What+You+Need+To+Know+About+SQL+Injection"  title="Bookmark this blog using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="Bookmark this blog using any bookmark manager!" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pat-burt.com/web-development/what-you-need-to-know-about-sql-injection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Web Applications? Check Your Host First</title>
		<link>http://www.pat-burt.com/web-development/custom-web-applications-check-your-host-first/</link>
		<comments>http://www.pat-burt.com/web-development/custom-web-applications-check-your-host-first/#comments</comments>
		<pubDate>Tue, 13 May 2008 02:56:01 +0000</pubDate>
		<dc:creator>Patrick Burt</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.pat-burt.com/web-development/custom-web-applications-check-your-host-first/</guid>
		<description><![CDATA[I&#8217;ve gone through experiences recently with certain web hosts that reminded me that making assumptions when it comes to host+software compatibility is a big, big mistake. What had happened was that I had read the software requirements before purchasing a custom web applications (think something along the lines of a forum, or newsletter software) and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve gone through experiences recently with certain web hosts that reminded me that making assumptions when it comes to host+software compatibility is a big, big mistake.<br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script><br />
What had happened was that I had read the software requirements before purchasing a custom web applications (think something along the lines of a forum, or newsletter software) and knew that the host met these requirements. Little did I know that the hosting company had some settings turned off and on in the background that could affect the software I just paid $200+ for.</p>
<p>With a few carefully placed questions (in writing), you can save yourself a lot of time and energy. You&#8217;d also have a string of communications that could help you get your money back in the event that it turned out the host lied about their capabilities.</p>
<h2>What To Ask The Software Developer</h2>
<ul>
<li>Will this run on a default installation of Apache/PHP/IIS/ASP/ASP.NET etc.?</li>
<li>Which hosting provider do you recommend for your software?</li>
<li>Does the host require 3rd party software to be installed on the server box itself? This will affect you if you&#8217;re using a shared hosting package instead of a dedicated server.</li>
</ul>
<h2>What To Ask The Host</h2>
<ul>
<li>Have you altered the server variables that would in any way require work-arounds on the part of the developer?</li>
<li>Are you running something other than a Linux or Windows environment? Something like a hybrid?</li>
<li>Have you had any customers mention that they&#8217;ve wanted to install the XXXXXXXX software package?</li>
<li>What versions of ASP.NET/PHP/etc. do you have installed?</li>
<li>Have default installations/configurations been altered? (Eg. Have the trust levels for ASP.NET been adjusted?)</li>
</ul>
<p>Hope that helps. <img src='http://www.pat-burt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div><a rel="nofollow" href="http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Fwww.pat-burt.com%2Fweb-development%2Fcustom-web-applications-check-your-host-first%2F&amp;title=Custom+Web+Applications%3F+Check+Your+Host+First"  title="Bookmark this blog using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="Bookmark this blog using any bookmark manager!" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pat-burt.com/web-development/custom-web-applications-check-your-host-first/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tips On Developing HTML Emails and Email Templates (Part 2)</title>
		<link>http://www.pat-burt.com/web-development/tips-on-developing-html-emails-and-email-templates-part-2/</link>
		<comments>http://www.pat-burt.com/web-development/tips-on-developing-html-emails-and-email-templates-part-2/#comments</comments>
		<pubDate>Tue, 06 May 2008 16:29:26 +0000</pubDate>
		<dc:creator>Patrick Burt</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.pat-burt.com/web-development/tips-on-developing-html-emails-and-email-templates-part-2/</guid>
		<description><![CDATA[This is a continuation on the first article I wrote on developing HTML emails and email templates. Let&#8217;s jump right into some tips: Use HTML markup to style whenever possible. Use attributes like background=&#8221;" whenever possible. CSS backgrounds will incorrectly render in GMail, so whenever applicable, make sure your background will work if applied to [...]]]></description>
			<content:encoded><![CDATA[<p>This is a continuation on the first article I wrote on <a href="http://www.pat-burt.com/web-development/tips-on-developing-html-emails-and-email-templates/" title="HTML Email Templates">developing HTML emails and email templates</a>. Let&#8217;s jump right into some tips:<br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></p>
<ul>
<li><strong>Use HTML markup to style whenever possible.</strong> Use attributes like <strong>background=&#8221;"</strong> whenever possible. CSS backgrounds will incorrectly render in GMail, so whenever applicable, make sure your background will work if applied to a table cell (&lt;td&gt;)</li>
<li><strong>Text, Text, Text</strong>. In most email applications, external images will require an action (such as clicking &#8220;Display all image below&#8221; before images are displayed. Do your best to use CSS and Font tags to style text instead of including large images so that the user still has an opportunity to see content before having to click on a prompt.</li>
<li><strong>Emails have folds too.</strong> Like websites, emails will have folds (the portion of an email visible without having to scroll). The fold will be really high, because of headers and vertical space being taken up by applications or web applications. Keep that in mind when placing your call-to-action.</li>
<li><strong>Support the ability to unsubscribe.</strong> At the footer of your email, provide the user an easy way to unsubscribe to the newsletter. He may be breaching agreements with your hosting company or ISP if you send unsolicited email without doing so.</li>
<li><strong>Your subject line is more important then your email.</strong> You will lose a majority of your users before they even see your email. Be sure to take the time to think about a clever/catchy subject line for your target audience so that you can get more users into your email.</li>
</ul>
<p>That&#8217;s all for now, hope that helps. <img src='http://www.pat-burt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div><a rel="nofollow" href="http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Fwww.pat-burt.com%2Fweb-development%2Ftips-on-developing-html-emails-and-email-templates-part-2%2F&amp;title=Tips+On+Developing+HTML+Emails+and+Email+Templates+%28Part+2%29"  title="Bookmark this blog using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="Bookmark this blog using any bookmark manager!" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pat-burt.com/web-development/tips-on-developing-html-emails-and-email-templates-part-2/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>CSS Layout Basics &#8211; Part 2</title>
		<link>http://www.pat-burt.com/web-development/css-layout-basics-part-2/</link>
		<comments>http://www.pat-burt.com/web-development/css-layout-basics-part-2/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 17:17:42 +0000</pubDate>
		<dc:creator>Patrick Burt</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.pat-burt.com/web-development/css-layout-basics-part-2/</guid>
		<description><![CDATA[Now you&#8217;ve gotten through Part 1 of CSS Layout Basics and you understand the basic principles behind CSS, we can get a little deeper. Not all CSS requires stylesheets. Apart from a stylesheet, there are two ways to incorporate CSS: inline CSS and page CSS. Inline CSS Inline CSS is referred to when CSS is [...]]]></description>
			<content:encoded><![CDATA[<p>Now you&#8217;ve gotten through <a href="http://www.pat-burt.com/web-development/css-layout-basics-part-1/" title="CSS Layout Basics">Part 1 of CSS Layout Basics</a> and you understand the basic principles behind CSS, we can get a little deeper.<br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script><br />
Not all CSS requires stylesheets. Apart from a stylesheet, there are two ways to incorporate CSS: inline CSS and page CSS.</p>
<h2>Inline CSS</h2>
<p>Inline CSS is  referred to when CSS is inserted to the HTML tag via a style attribute. This CSS will only affect that particular HTML tag. Example: We can change our Header 2 to a sixteen pixel font size with the following code:</p>
<p><strong>&lt;h2 style=&#8221;font-size:16px;&#8221;&gt;My Sixteen Point Header&lt;/h2&gt; </strong></p>
<p>This will not affect any other Header 2&#8242;s on the page. Since CSS does not observe line breaks, we can insert multiple CSS attributes into the style attribute:</p>
<p><strong>&lt;h2 style=&#8221;font-size:16px;color:#ff0000;&#8221;&gt;My Sixteen Point Header&lt;/h2&gt;</strong></p>
<p>This method is not 100% recommended because it is tedious to revisit multiple files and dig into the code to make simple changes.</p>
<h2>Page CSS</h2>
<p>In your page&#8217;s &lt;head&gt; tag, you can insert CSS that will affect that page only. This will look similar to a stylesheet, except for that there will be HTML tags above and below the CSS. Example:</p>
<p><strong> &lt;style type=&#8221;text/css&#8221;&gt;<br />
p {color:#ff0000;}<br />
&lt;/style&gt;</strong></p>
<p>Again, this is not 100% recommended because it is tedious to revisit multiple files and dig into the code to make simple changes.</p>
<h2>Most Important Attributes</h2>
<p>Before we get in knee deep in CSS, let&#8217;s go over the most important attributes.</p>
<ul>
<li><strong>Height</strong> &#8211; Determines the height of the CSS item (Example: <strong>10%</strong>, <strong>70px</strong>)</li>
<li><strong>Width</strong> &#8211; Determines the width of the CSS item (Example: <strong>10%</strong>, <strong>70px</strong>)</li>
<li><strong>Color</strong> &#8211; Determines the color of the CSS attribute (Example: <strong>red</strong>, <strong>#ff0000</strong>, <strong>#f00</strong>)</li>
<li><strong>Font-Family, Font-Size, Line-Height, Letter-Spacing, Font-Weight</strong> &#8211; Changes the attributes of the text in the container. Examples:<br />
<strong>font-family: Arial, Helvetica, sans-serif;<br />
font-size:16px;<br />
line-height:18px;<br />
letter-spacing:-1px;<br />
font-weight:bold;</strong></li>
<li><strong>Padding</strong> &#8211; This is the buffer space on the inside of the CSS element. Formatted from the top of the div container, clockwise to the left of the div container. (Example: <strong>padding:5px 0 8px 16px;</strong>)</li>
<li><strong>Margin</strong> &#8211; This is the buffer space on the outside of the CSS element. Again, formatted from the top of the div container, clockwise to the left of the div container. (Example: <strong>margin: 5px 10px 0 0;</strong>)</li>
<li><strong>Background-Color, Background-Image, Background-Repeat, Background-Position</strong>. These are fairly straight-forward:<br />
<strong>background-color:#ff0000;</strong><br />
<strong>background-image:url(images/background.jpg);</strong><br />
<strong>background-repeat:no-repeat;</strong> /*also repeat-x or repeat-y*/<br />
<strong>background-position:top center;</strong> /*or pixel values*/</li>
</ul>
<p>Those values alone can put together a pretty complicated website. Next week, I will discuss more difficult attributes and how to get started. Hope that helps. <img src='http://www.pat-burt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div><a rel="nofollow" href="http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Fwww.pat-burt.com%2Fweb-development%2Fcss-layout-basics-part-2%2F&amp;title=CSS+Layout+Basics+%26%238211%3B+Part+2"  title="Bookmark this blog using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="Bookmark this blog using any bookmark manager!" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pat-burt.com/web-development/css-layout-basics-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>7 Tips For Getting Your Emails Through Spam Filters</title>
		<link>http://www.pat-burt.com/web-development/10-tips-for-getting-your-emails-through-spam-filters/</link>
		<comments>http://www.pat-burt.com/web-development/10-tips-for-getting-your-emails-through-spam-filters/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 16:08:05 +0000</pubDate>
		<dc:creator>Patrick Burt</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.pat-burt.com/web-development/10-tips-for-getting-your-emails-through-spam-filters/</guid>
		<description><![CDATA[When developing websites, you&#8217;ll often be tasked with launching emails from your web server to a variety of destinations, whether they&#8217;re internal or external. These emails can be confirmation emails, newsletters, etc. However, sometimes they get caught in various spam filters, and since many spam filters are different, it&#8217;s hard to pinpoint what you need [...]]]></description>
			<content:encoded><![CDATA[<p>When developing websites, you&#8217;ll often be tasked with launching emails from your web server to a variety of destinations, whether they&#8217;re internal or external. These emails can be confirmation emails, newsletters, etc. However, sometimes they get caught in various spam filters, and since many spam filters are different, it&#8217;s hard to pinpoint what you need to do for each one to get your email through. Here are a few tips that can help you get to your destination.<br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script><br />
<strong>1 &#8211; Keywords</strong><br />
This seems like the biggest culprit. If at all possible, stay away from keywords such as <strong>Sale</strong>, <strong>20% Off</strong>, <strong>Limited Time Offer</strong>, etc. There&#8217;s no definite list, but you can use your judgment. Of course, there&#8217;s also the obvious: <strong>Forex</strong>, <strong>Rolex</strong>, <strong>Viagra</strong>, etc.</p>
<p><strong>2 &#8211; Text Alternate (or simple HTML alternate)</strong><br />
If you&#8217;re launching HTML emails, be sure to include a text-only alternate (and vice-versa). Not only does it help with getting your email through filters, but also with recipients who check their emails on mobile devices.</p>
<p><strong>3 &#8211; SMTP</strong><br />
If at all possible, use an SMTP server to launch emails instead of using unauthenticated email.</p>
<p><strong>4 &#8211; Link Destinations<br />
</strong>Have a look at your link destination, avoid including hyperlinks with the following destinations:</p>
<ul>
<li>An IP</li>
<li>A port number</li>
<li>A deep folder architecture (eg. http://www.pat-burt.com/insiders/content/avi/download/getit.html)</li>
<li>Subdomains</li>
</ul>
<p><strong>5 &#8211; Recipient List</strong><br />
If at all possible, try to send the emails to recipients individually. Multiple recipients in a <strong>To</strong>, <strong>CC</strong> or <strong>BCC</strong> field can start to get flagged as bad news.</p>
<p><strong>6 &#8211; To and From Fields</strong><br />
This is different for each programming language, but make an effort to list the sender&#8217;s and the recipient&#8217;s name or organization, instead of uniquely the email.</p>
<p><strong>7 &#8211; External Applications</strong><br />
External email distributors such as <a href="http://www.campaigner.com/" rel="nofollow" title="Campaigner">Campaigner</a> will actively make sure you&#8217;re email doesn&#8217;t get blocked by taking a few of the precautions mentioned above for you. They are also more likely to be making sure that their origin/IP isn&#8217;t blacklisted to most spam filters. It gets riskier if you decide to go with cheaper Walmart hosting and run the risk of getting flagged by other users who share the same server.</p>
<p>Hope that helps, that&#8217;s all for now.</p>
<div><a rel="nofollow" href="http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Fwww.pat-burt.com%2Fweb-development%2F10-tips-for-getting-your-emails-through-spam-filters%2F&amp;title=7+Tips+For+Getting+Your+Emails+Through+Spam+Filters"  title="Bookmark this blog using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="Bookmark this blog using any bookmark manager!" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pat-burt.com/web-development/10-tips-for-getting-your-emails-through-spam-filters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS Layout Basics &#8211; Part 1</title>
		<link>http://www.pat-burt.com/web-development/css-layout-basics-part-1/</link>
		<comments>http://www.pat-burt.com/web-development/css-layout-basics-part-1/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 17:03:43 +0000</pubDate>
		<dc:creator>Patrick Burt</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.pat-burt.com/web-development/css-layout-basics-part-1/</guid>
		<description><![CDATA[In the event you&#8217;ve figured out that you want to ditch table-based layouts and build CSS-based layouts, but you just don&#8217;t know where to start, I&#8217;m here to help. I won&#8217;t go too indepth, but I&#8217;ll cover the basics. You will need to have two files. An HTML file, and a CSS file. Both of [...]]]></description>
			<content:encoded><![CDATA[<p>In the event you&#8217;ve figured out that you want to ditch <a href="http://www.pat-burt.com/web-development/6-reasons-to-ditch-your-table-based-layout/" title="Table-based layouts">table-based layouts</a> and build CSS-based layouts, but you just don&#8217;t know where to start, I&#8217;m here to help. I won&#8217;t go too indepth, but I&#8217;ll cover the basics.</p>
<p>You will need to have two files. An HTML file, and a CSS file. Both of these can be blank, but try to make sure they have the right extension in the filename. You can link the CSS file with the following code in your HTML &lt;head&gt; tag:<br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script><br />
<strong> &lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; href=&#8221;myStylesheet.css&#8221;&gt;</strong></p>
<p>Okay, now that we&#8217;ve got two files, let&#8217;s get started.</p>
<p>Your basic element HTML markup consists of a DIV tag: <strong>&lt;div&gt;&lt;/div&gt;</strong> . A DIV container is a square. By default, it&#8217;s as tall as the content within it, and fits to the width of whatever element it&#8217;s in.</p>
<p>This DIV tag is modifiable in almost every way imaginable in CSS. What you need to do is establish the link between your HTML markup and your CSS element. You would do so using an ID, or a CLASS. The only difference is that ID&#8217;s are only used once on a single page. Let&#8217;s say you want to display the text within the div at a 12 pixel font size.</p>
<h2>Using an ID</h2>
<p><strong>HTML Markup</strong><br />
&lt;div id=&#8221;myCSS&#8221;&gt;12 Pixel Font&lt;/div&gt; <strong><br />
CSS</strong><br />
#myCSS {font-size:12px;}</p>
<h2>Using a CLASS</h2>
<p><strong>HTML Markup</strong><br />
&lt;div class=&#8221;myCSS&#8221;&gt;12  Pixel Font&lt;/div&gt;<br />
<strong>CSS</strong><br />
.myCSS {font-size:12px;}</p>
<p>Notice how I had to use a <strong>pound sign (#) </strong>when defining an ID in the CSS and a <strong>period (.)</strong> when defining a CLASS.  In your CSS file, you can add as many attributes as you like within the curly brackets and it will affect the respective DIV container. If we wanted our <strong>myCSS</strong> class to appear bold, we would do the following:</p>
<p><strong>.myCSS {font-size:12px;font-weight:bold;} </strong></p>
<p>Like HTML, CSS has little importance on how you space your markup. The above CSS will perform exactly the same as:</p>
<p><strong>.myCSS {<br />
font-size:12px;<br />
font-weight:bold;<br />
} </strong></p>
<h2>Other HTML Elements</h2>
<p>All elements can be styled using CSS as long as they are references properly. Technically, the only difference between a DIV tag and a SPAN tag (or P tag, LI tag, etc.) is that they each have preset attributes to make coding easier. A DIV container, as mentioned earlier, will, by default, fill the width. A SPAN container will, by default, display inline with other elements. You can just as easily use one for the other like so:</p>
<p><strong>HTML</strong><br />
&lt;div id=&#8221;actsLikeASpanTag&#8221;&gt;I&#8217;m a span tag.&lt;/div&gt;<br />
<strong>CSS</strong><br />
#actsLikeASpanTag {display:inline;}</p>
<p>That&#8217;s all for now, hope that gets you started. <img src='http://www.pat-burt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div><a rel="nofollow" href="http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Fwww.pat-burt.com%2Fweb-development%2Fcss-layout-basics-part-1%2F&amp;title=CSS+Layout+Basics+%26%238211%3B+Part+1"  title="Bookmark this blog using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="Bookmark this blog using any bookmark manager!" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pat-burt.com/web-development/css-layout-basics-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 Web Development Tips Part 3 (CSS Edition)</title>
		<link>http://www.pat-burt.com/web-development/10-web-development-tips-part-3-css-edition/</link>
		<comments>http://www.pat-burt.com/web-development/10-web-development-tips-part-3-css-edition/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 13:36:19 +0000</pubDate>
		<dc:creator>Patrick Burt</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.pat-burt.com/web-development/10-web-development-tips-part-3-css-edition/</guid>
		<description><![CDATA[This article is part 3 of our 10 web development tips series. If you’re interested in part 1, click here, or in part 2, click here. These 10 tips will deal more with CSS and developing your HTML base template from the design. 1 &#8211; Use ID instead of CLASS wherever possible In the example: [...]]]></description>
			<content:encoded><![CDATA[<p>This article is part 3 of our <strong>10 web development tips</strong> series. If you’re interested in part 1, <a href="http://www.pat-burt.com/web-development/10-web-development-quick-tips-part-1/" title="10 Web Development Tips">click here</a>, or in part 2, <a href="http://www.pat-burt.com/web-development/10-web-development-tips-part-2/" title="10 Wed development tips part 2">click here</a>. These 10 tips will deal more with CSS and developing your HTML base template from the design.<br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script><br />
<strong>1 &#8211; Use ID instead of CLASS wherever possible</strong><br />
In the example: &lt;div id=&#8221;myID&#8221;&gt;myID&lt;/div&gt; ID references the definition in the CSS file. IDs are used for items that are used once. For example, you can&#8217;t have two myID&#8217;s on the same page. It can allow you to better track what you&#8217;ve done. ID is also a lot shorter to type then class.</p>
<p><strong>2 &#8211; Recycle old code whenever possible</strong><br />
Have you done a similar top navigation before? Make use of the code you developed for a project you finished 6 months ago. Time is money and you don&#8217;t want to go through the headaches you went through 6 months ago.</p>
<p><strong>3 &#8211; Keep in mind what needs to printed</strong><br />
Although you can prepare print stylesheets, you can save yourself headaches later by remembering what needs to be printed and using an image or a CSS background accordingly. For example, clients typically like having their logos printed out, something that won&#8217;t happen unless it&#8217;s an image or you do a CSS workaround on your print stylesheet.</p>
<p><strong>4 &#8211; It&#8217;s more important to keep your HTML simple</strong><br />
In the event that you can to choose between a more complicated HTML markup or a more complicated CSS file, go with the more complicated CSS file. Although you won&#8217;t think your template will get too bad, content added to your template may start to get a little cumbersome.</p>
<p><strong>5 &#8211; Keep a library of stripped down useful functions</strong><br />
I often search my own blog and take a peak at my CSS Popup code whenever I need it because the code is in its simplest form. Sometimes pulling a developed version from another site you developed is a little trickier because you&#8217;ll have to undo the customizations you did.</p>
<p><strong>6 &#8211; Use multiple stylesheets</strong><br />
In some occassions, you will need a decent clump of  CSS code to make a single page on your website display correctly. Use a separate stylesheet for that page so that users who don&#8217;t access that specific page don&#8217;t have to download all that CSS.</p>
<p><strong>7 &#8211; Know how to deal with PNGs</strong><br />
PNGs require a decent amount of work to get them to function correctly in every browser AND to validate. This becomes especially useful as more and more websites have drop shadows over complex backgrounds.</p>
<p><strong>8 &#8211; Easy custom bullets<br />
</strong>The easiest way to do custom bullets that function correctly in every browser is to use a background image for the &lt;li&gt; item. For this not to go bonkers with the lists in general, set the margin and padding to 0 for the &lt;ul&gt; and &lt;li&gt; item and work from there.</p>
<p><strong>9 &#8211; Know how to replace quotes and apostrophes</strong><br />
These can start causing problems in fields such as text fields or text areas. Example: <strong>&lt;input type=&#8221;text&#8221; value=&#8221;He said:&#8221;I don&#8217;t know what you&#8217;re talking about&#8221;" /&gt;</strong> This would cause a giant mess and an unintended result. A quote can be replaced by <strong>&amp;#34;</strong> and an apostrophe can be replaced by <strong>&amp;#39; </strong><em>(Don&#8217;t use &amp;apos; or &amp;quot; as these don&#8217;t work all that well across all browsers)</em></p>
<p><strong>10 &#8211; Radio buttons? Make sure you have one selected</strong><br />
Having a radio button pre-selected saves you from having to validate a blank result if the user chooses not to select an answer. For example, if you ask the user to select either Male or Female and neither one is selected by default, you&#8217;ll have to run form validation that makes sure that one or the other is selected. If you select Male by default, it&#8217;ll save that extra coding time. Besides, if you allowed users to not select an option, you&#8217;d use checkboxes instead of radio buttons.</p>
<p>That&#8217;s all for now, hope that helps. <img src='http://www.pat-burt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div><a rel="nofollow" href="http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Fwww.pat-burt.com%2Fweb-development%2F10-web-development-tips-part-3-css-edition%2F&amp;title=10+Web+Development+Tips+Part+3+%28CSS+Edition%29"  title="Bookmark this blog using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="Bookmark this blog using any bookmark manager!" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pat-burt.com/web-development/10-web-development-tips-part-3-css-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

