<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>israeljernigan.com</title>
	
	<link>http://www.israeljernigan.com</link>
	<description>personal web blogger</description>
	<lastBuildDate>Fri, 18 Jan 2008 22:59:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/israeljernigan" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>CSS Float: The Basics To Get You Started</title>
		<link>http://feedproxy.google.com/~r/israeljernigan/~3/vK5L2a_zpy8/css-float-the-basics-to-get-you-started</link>
		<comments>http://www.israeljernigan.com/css-float-the-basics-to-get-you-started#comments</comments>
		<pubDate>Fri, 18 Jan 2008 11:00:13 +0000</pubDate>
		<dc:creator>Israel Jernigan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[float]]></category>
		<category><![CDATA[learning]]></category>

		<guid isPermaLink="false">http://www.israeljernigan.com/css-float-the-basics-to-get-you-started</guid>
		<description>This is the first a series of blog posts that I&amp;#8217;m going to be writing that has to do with the CSS float property. I hope you can learn from this and be able to have a broader understanding of how you can use CSS to your benefit.
&amp;#8220;So what is it good for&amp;#8221;, you say? [...]</description>
			<content:encoded><![CDATA[<p>This is the first a series of blog posts that I&#8217;m going to be writing that has to do with the CSS <strong>float</strong> property. I hope you can learn from this and be able to have a broader understanding of how you can use CSS to your benefit.</p>
<p><strong>&#8220;So what is it good for&#8221;,</strong> you say? One of the easiest uses of the <strong>float</strong> property is to wrap text around a html block-level element.</p>
<p>You can make an image or even a section on your webpage have text wrap around it. I will show you examples of both.<br />
<span id="more-26"></span><br />
First, you will need a long paragraph</p>
<pre>&lt;div id="post-float-content"&gt;&lt;p&gt;This is a paragraph of text to experiment with the float property. This is a paragraph of text to experiment with the float property. This is a paragraph of text to experiment with the float property. This is a paragraph of text to experiment with the float property. This is a paragraph of text to experiment with the float property. &lt;/p&gt;&lt;/div&gt;</pre>
<p>Next, you will need the element you want floated.</p>
<pre>&lt;span class="post-float-element"&gt;This is the html element being floated.&lt;/span&gt;</pre>
<p>If you want you can also use an image or any other element you want floated. Here is an example.</p>
<pre>&lt;img src="#" class="post-float-element" alt="Image Test for Float"  /&gt;</pre>
<p>Any element you assign the <strong>float</strong> property to will become a block-level element.</p>
<p>Now put the code together, and you will soon be on your way to text wrapping bliss. For this example, I want my floated element to be near the top. So I will put it outside the paragraph tag. You can put it anywhere you like, even inside the paragraph. But you won&#8217;t see any wrapping if you put it at the end of the paragraph. Feel free to experiment until you get what you are looking to achieve.</p>
<h3>Now for the CSS.</h3>
<p>I&#8217;ve added some basic styling to the floated element. So that you can see how the block-level element is behaving inside the paragraph. It should be very apparent what is going on.</p>
<pre>
.post-float-element{
float:left;
width:100px;
height:50px;
border:1px solid #444;
padding:2px;
background-color:#dedede;
clear:left;
}</pre>
<p>Here is the example in full. I hope you&#8217;ve enjoyed this basic post about the <strong>float</strong> property. There will be more to come integrating the <strong>float</strong> property into other parts of your website.</p>
<p id="post-float-content"><span class="post-float-element">This is the html element being floated.</span>This is a paragraph of text to experiment with the float property. This is a paragraph of text to experiment with the float property. This is a paragraph of text to experiment with the float property. This is a paragraph of text to experiment with the float property.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/israeljernigan?a=vK5L2a_zpy8:pd8WZYvun8s:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=vK5L2a_zpy8:pd8WZYvun8s:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=vK5L2a_zpy8:pd8WZYvun8s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=vK5L2a_zpy8:pd8WZYvun8s:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=vK5L2a_zpy8:pd8WZYvun8s:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=vK5L2a_zpy8:pd8WZYvun8s:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=vK5L2a_zpy8:pd8WZYvun8s:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=vK5L2a_zpy8:pd8WZYvun8s:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=vK5L2a_zpy8:pd8WZYvun8s:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=vK5L2a_zpy8:pd8WZYvun8s:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/israeljernigan/~4/vK5L2a_zpy8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.israeljernigan.com/css-float-the-basics-to-get-you-started/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.israeljernigan.com/css-float-the-basics-to-get-you-started</feedburner:origLink></item>
		<item>
		<title>CSS Learning Resources</title>
		<link>http://feedproxy.google.com/~r/israeljernigan/~3/Nm7aFMATxwI/css-learning-resources</link>
		<comments>http://www.israeljernigan.com/css-learning-resources#comments</comments>
		<pubDate>Mon, 14 Jan 2008 15:30:15 +0000</pubDate>
		<dc:creator>Israel Jernigan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[learning]]></category>

		<guid isPermaLink="false">http://www.israeljernigan.com/css-learning-resources</guid>
		<description>One of the first coding languages I taught myself was CSS. I&amp;#8217;ve learned the wrong way and right way to do many of the tasks CSS can handle. Hopefully some of the resources below will help someone else alpong their way to CSS mastery.
Books
The first book I ever purchased about CSS was very helpful at [...]</description>
			<content:encoded><![CDATA[<p>One of the first coding languages I taught myself was <a href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" target="_blank" title="Wikipedia.org link for CSS">CSS</a>. I&#8217;ve learned the wrong way and right way to do many of the tasks CSS can handle. Hopefully some of the resources below will help someone else alpong their way to CSS mastery.</p>
<h3>Books</h3>
<p>The first book I ever purchased about CSS was very helpful at explaining <em>why</em> you do certain things with CSS.</p>
<p>[asa personal_post]1590596145[/asa]</p>
<p>Another book I have used many times on ways to work around old browsers or weird quirks was helpful in my CSS learning experience.</p>
<p>[asa personal_post]0764579851[/asa]</p>
<p>The book below is a great reference for terminology and rules. A must for those who don&#8217;t remember what a :pseudo-element refers to.</p>
<p>[asa personal_post]0596515057[/asa]</p>
<h3>Website Links</h3>
<p>One of the best <a href="http://www.cssplay.co.uk/index.html" title="A must for your Bookmark list." target="_blank">CSS <strong>example</strong> websites</a> out there.</p>
<p>Basic <a href="http://www.alvit.de/css-showcase/css-navigation-techniques-showcase.php" title="A great site of sample CSS menus." target="_blank"><strong>menu</strong> designs</a> done in CSS.</p>
<p><a href="http://www.smashingmagazine.com/2007/05/10/70-expert-ideas-for-better-css-coding/" title="Examples and links to CSS best practices." target="_blank">Great list</a> of CSS <strong>best practices</strong>.</p>
<p>CSS <strong>layouts</strong> done well for almost <a href="http://blog.html.it/layoutgala/" title="A great grouping of CSS layout/design." target="_blank">any situation</a>.</p>
<h3>Random Resources</h3>
<p><a href="http://www.29digital.net/grid/" title="Save the link, and use it!" target="_blank">Grid calculator</a> for your layouts.</p>
<p>What you <a href="http://www.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/" title="A great link that explains common confusing CSS concepts." target="_blank">should know</a> about CSS specificity.</p>
<p>An Em to Px <a href="http://riddle.pl/emcalc/" title="A great resource for fluid layouts." target="_blank">calculator</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/israeljernigan?a=Nm7aFMATxwI:sPiEi3Qdt0w:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=Nm7aFMATxwI:sPiEi3Qdt0w:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=Nm7aFMATxwI:sPiEi3Qdt0w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=Nm7aFMATxwI:sPiEi3Qdt0w:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=Nm7aFMATxwI:sPiEi3Qdt0w:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=Nm7aFMATxwI:sPiEi3Qdt0w:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=Nm7aFMATxwI:sPiEi3Qdt0w:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=Nm7aFMATxwI:sPiEi3Qdt0w:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=Nm7aFMATxwI:sPiEi3Qdt0w:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=Nm7aFMATxwI:sPiEi3Qdt0w:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/israeljernigan/~4/Nm7aFMATxwI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.israeljernigan.com/css-learning-resources/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.israeljernigan.com/css-learning-resources</feedburner:origLink></item>
		<item>
		<title>PHP Learning resources</title>
		<link>http://feedproxy.google.com/~r/israeljernigan/~3/r_UecI-XPBg/php-learning-resources</link>
		<comments>http://www.israeljernigan.com/php-learning-resources#comments</comments>
		<pubDate>Fri, 11 Jan 2008 15:35:57 +0000</pubDate>
		<dc:creator>Israel Jernigan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[learning]]></category>

		<guid isPermaLink="false">http://www.israeljernigan.com/php-learning-resources</guid>
		<description>There are a few resources for PHP that I feel have been vital in my learning the language. From books to websites, I will try and give a short grouping that will hopefully help you understand PHP better.
Books
Some of the best help books I&amp;#8217;ve found are written by, Larry Ullman. Here is one of his [...]</description>
			<content:encoded><![CDATA[<p>There are a few resources for PHP that I feel have been vital in my learning the language. From books to websites, I will try and give a short grouping that will hopefully help you understand PHP better.</p>
<h3>Books</h3>
<p>Some of the best help books I&#8217;ve found are written by, Larry Ullman. Here is one of his best.</p>
<p>[asa personal_post]0321336577[/asa]</p>
<p>This was my first PHP book. It&#8217;s not the greatest book out there, but if you want full application examples this is the book for you.</p>
<p>[asa personal_post]0764579665[/asa]</p>
<p>This next book isn&#8217;t a PHP book, but it is a great resource for learning <a href="http://en.wikipedia.org/wiki/Mysql" target="_blank" title="Wikipedia.org link for MySQL">MySQL</a>. MySQL is free database component that works great with PHP.</p>
<p>[asa personal_post]0672327120[/asa]</p>
<h3>Website Links</h3>
<p>PHP <strong>cookies</strong> were something I didn&#8217;t learn from a book. Here are a few links that really helped me develop those skills. <a href="http://www.go4expert.com/forums/showthread.php?t=219" title="PHP and cookies tutorial" target="_blank">PHP and cookies</a>. <a href="http://us2.php.net/manual/en/function.setcookie.php" title="An amazing resource for everything PHP" target="_blank">PHP.net documentation</a>.</p>
<p><a href="http://www.webdesignforums.net/archive/index.php/t-21029.html" title="Great forum resource for PHP" target="_blank">Here is a great <strong>forum</strong></a>, not just for PHP, with lots of questions answered about PHP.</p>
<p>I wanted to learn about <strong>REGEXP</strong> in PHP, mostly for security verification. Here are two links that helped pave the way. <a href="http://www.jellyandcustard.com/2006/06/13/regular-expressions-in-php/" title="There are basic concepts and examples for REGEXP in PHP" target="_blank">The basics</a>. <a href="http://www.roscripts.com/PHP_regular_expressions_examples-136.html" title="Using custom functions to integrate REGEXP in PHP" target="_blank">More advanced methods</a>.</p>
<p>Just a great website with lots of PHP <a href="http://www.goodphptutorials.com/" title="A really good tutorial website" target="_blank">centered <strong>tutorials</strong></a>.</p>
<p><a href="http://www.php.net" title="You need to use this as a resource and for learning." target="_blank">PHP.net</a>. Just use it!</p>
<h3>Random Resources</h3>
<p>Just some <a href="http://www.reinholdweber.com/?p=3" title="Optimize and prioritize your PHP" target="_blank">good ideas to implement</a>.</p>
<p>Sometimes there are <a href="http://www.digital-web.com/" title="Try searching here for PHP" target="_blank">good articles at Digital-Web.com</a> about PHP.</p>
<p>You should at least <a href="http://passwordrobot.com/blog/5-htaccess-tricks-every-webmaster-should-know/" title="You never know when you might need to use this" target="_blank">check out</a> .htaccess.</p>
<p>Great <a href="http://www.alistapart.com/" title="Well written articles about alot of different things concerning the digital world." target="_blank">articles at alistapart.com</a> about alot of things, including php.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/israeljernigan?a=r_UecI-XPBg:QHSAvm88mbk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=r_UecI-XPBg:QHSAvm88mbk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=r_UecI-XPBg:QHSAvm88mbk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=r_UecI-XPBg:QHSAvm88mbk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=r_UecI-XPBg:QHSAvm88mbk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=r_UecI-XPBg:QHSAvm88mbk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=r_UecI-XPBg:QHSAvm88mbk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=r_UecI-XPBg:QHSAvm88mbk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=r_UecI-XPBg:QHSAvm88mbk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=r_UecI-XPBg:QHSAvm88mbk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/israeljernigan/~4/r_UecI-XPBg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.israeljernigan.com/php-learning-resources/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.israeljernigan.com/php-learning-resources</feedburner:origLink></item>
		<item>
		<title>Learning ASP.NET</title>
		<link>http://feedproxy.google.com/~r/israeljernigan/~3/GpPd2Z9g2gw/learning-aspnet</link>
		<comments>http://www.israeljernigan.com/learning-aspnet#comments</comments>
		<pubDate>Tue, 08 Jan 2008 15:41:14 +0000</pubDate>
		<dc:creator>Israel Jernigan</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[learning]]></category>

		<guid isPermaLink="false">http://www.israeljernigan.com/learning-aspnet</guid>
		<description>So one of my goals this year is to learn ASP.NET. So I looked at book reviews, read blog articles, and talked to some friends as to what I should learn about ASP. I got out of it that I should learn C#, learn what MVC is, and to just start coding ASP.NET on my [...]</description>
			<content:encoded><![CDATA[<p>So one of my goals this year is to learn ASP.NET. So I looked at book reviews, read blog articles, and talked to some friends as to what I should learn about ASP. I got out of it that I should learn <a href="http://en.wikipedia.org/wiki/C_sharp" target="_blank" title="Wikipedia.org link for C#">C#</a>, learn what <a href="http://en.wikipedia.org/wiki/Model-view-controller" target="_blank" title="Wikipedia.org link for MVC">MVC</a> is, and to just start coding ASP.NET on my own.</p>
<h3>Books Recommended</h3>
<p>Here is the list of books that I researched were really good at the teaching the basics, and had amazing reviews on Amazon.</p>
<p>[asa personal_post]0975240285[/asa]</p>
<p>[asa personal_post]059600916X[/asa]</p>
<h3>Online Tutorials</h3>
<p>Also, one of the best resources for tutorials is actually <a href="http://asp.net/learn/" title="Watch video tutorials on asp.net" target="_blank">asp.net</a>. There are video tutorials from &#8216;best coding practices&#8217; to &#8216;integrating AJAX&#8217;. You should really check them out if you like video tutorials.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/israeljernigan?a=GpPd2Z9g2gw:oBtp3e0jCVU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=GpPd2Z9g2gw:oBtp3e0jCVU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=GpPd2Z9g2gw:oBtp3e0jCVU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=GpPd2Z9g2gw:oBtp3e0jCVU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=GpPd2Z9g2gw:oBtp3e0jCVU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=GpPd2Z9g2gw:oBtp3e0jCVU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=GpPd2Z9g2gw:oBtp3e0jCVU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=GpPd2Z9g2gw:oBtp3e0jCVU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=GpPd2Z9g2gw:oBtp3e0jCVU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=GpPd2Z9g2gw:oBtp3e0jCVU:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/israeljernigan/~4/GpPd2Z9g2gw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.israeljernigan.com/learning-aspnet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.israeljernigan.com/learning-aspnet</feedburner:origLink></item>
		<item>
		<title>Reusing Images and Repetitive Content with CSS</title>
		<link>http://feedproxy.google.com/~r/israeljernigan/~3/DyO4CDuxc7w/reusing-images-and-repetitive-content-with-css</link>
		<comments>http://www.israeljernigan.com/reusing-images-and-repetitive-content-with-css#comments</comments>
		<pubDate>Fri, 16 Nov 2007 15:00:00 +0000</pubDate>
		<dc:creator>Israel Jernigan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[accessability]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[image-background]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[z-index]]></category>

		<guid isPermaLink="false">http://www.israeljernigan.com/reusing-images-and-repetitive-content-with-css</guid>
		<description>I work with websites that have a need for alot of images and repetitive content. One of the needs I&amp;#8217;ve had to work with is that of not wanting to change the original image once it&amp;#8217;s been uploaded, if the change is only temporary.
An example would be where you would need to make product links [...]</description>
			<content:encoded><![CDATA[<p>I work with websites that have a need for alot of images and repetitive content. One of the needs I&#8217;ve had to work with is that of not wanting to change the original image once it&#8217;s been uploaded, if the change is only temporary.</p>
<p>An example would be where you would need to make product links visually say &#8220;on sale&#8221;. And to do that without having to recreate thousands of images and reupload them.<br />
A preview of what we are trying to achieve.</p>
<p><img src="/post-content/onsale/saleExample.jpg" alt="Image change example" class="left" /></p>
<h3 class="clear">A few things that I want to keep in mind.</h3>
<ol>
<li>Usability for client</li>
<li>Reusable code/images</li>
<li>Accessibility</li>
<li>Valid xhtml</li>
</ol>
<p><span id="more-20"></span></p>
<p class="note">Note: Gladly you won&#8217;t need to compromise with any of these items to achieve the goal.</p>
<h3>Let&#8217;s start with the basic html we will need.</h3>
<p class="note">Note: &#8216;  »»&#8217; is for readability on this page, they are not part of the code.</p>
<pre>&lt;a href="#" title="View Item 602. On Sale Now!" class="box2"&gt;  »»&lt;img src="/post-content/onsale/602.jpg" alt="View Item 602. On Sale Now!"  /&gt;  »»

&lt;img src="/post-content/onsale/saleThmb.png" alt="This item is on sale!"   »»

height="0" width="0" class="sale" border="0"  /&gt;&lt;/a&gt;</pre>
<p>We have a <strong>link </strong>that has two images inside of it. The first image is the main image of the actual product we are trying to be linked. The second image is what we are going to use for the &#8220;on sale&#8221; part of the final link.</p>
<p>&#8220;Why does the second image have a <strong>height</strong> and <strong>width</strong> of 0&#8243;, you say? Ah, we&#8217;ll get to that in a bit.</p>
<p>Let&#8217;s get to the css first. We&#8217;ll start with the css for the <strong>link</strong>.</p>
<pre>.box2 {height:120px;

margin:6px 6px 0px 0px;

width:120px;

z-index:50;

position:relative;

float:left;

}</pre>
<p>We have a set <strong>height</strong> and <strong>width</strong> as well as a nice <strong>margin</strong> for the link. The margin is if there are going to be multiple links next to each other. They will line up nicely.</p>
<h3>What we are using z-index for</h3>
<p><img src="/post-content/onsale/z-index.jpg" alt="z-index layers example" class="left" /></p>
<p class="clear">I have set a <strong>z-index</strong> for the link. The reason that it is set at 50 is because I like to have some leeway with which way I can go on my z-index, and I don&#8217;t like to go into the negatives or go up or down by 1(it&#8217;s hard to check for errors). Also if you want z-index to work you will need to set a position for that element. I am using relative positioning.</p>
<h3>Now the code for the images</h3>
<p>Now let&#8217;s look at the css for the images. Starting with the first and then the second.</p>
<pre>
.box2 img{z-index:45;

position:relative;

height:120px;

width:120px;

border:0px;

}</pre>
<pre>
.box2 img.sale{position:absolute;

z-index:55;

top:0px;

left:0px;

border:0px;

height:120px;

width:120px;

}</pre>
<p>Now sense we didn&#8217;t want to recreate the image with the &#8220;on sale&#8221; on the original image we will need to put it on top of the other image. We accomplish this with a <strong>transparent png</strong>(or you could use gif) and <strong>z-index</strong>. We put the z-index for the image we want to be on top at a higher z-index, and the lower image to have a lower z-index. (Makes sense) We also set the position of the second image to <strong>absolute</strong>. This allows us to place that image wherever we want inside the link. And if we had not set the link to have a position the second image would not stay inside the link. Once we set the position we can place the image at the top and left of the link, with <strong>top</strong> and <strong>left</strong> set at <strong>0</strong>. Finally we set the <strong>height</strong> and <strong>width</strong> of the second image with css.</p>
<p>Now the reason we set the <strong>height</strong> and <strong>width</strong> of the second image in the xhtml to <strong>0</strong> is so that if the css or images are disabled the image will not be visible. I would rather my layout break, and break the way I want it to, than have an extra image laying around on the html page.</p>
<style type="text/css" media="screen">   a.box2 { float:left; height:120px; margin:6px 6px 0px 0px; width:120px; z-index:50; position:relative;} a.box2:link { border:none; }  a.box2 img { z-index:45; position:relative; height:120px; width:120px; border:0px; } a.box2 img.sale { position:absolute; z-index:55; top:0px; left:0px; border:0; height:120px; width:120px; } .footnote { color:#992200; } </style>
<p><a href="#" title="View Item 602." class="box2"><img src="/post-content/onsale/602.jpg" alt="View Item 602." /><img src="/post-content/onsale/saleThmb.png" alt="Item 602 is on sale!" class="sale" border="0" height="0" width="0" /></a></p>
<p class="clear">Viola! You know have reusable images and code for your product links. This will work in IE, Safari, and Mozilla browsers. The xhtml validates, and it&#8217;s totally accessable.</p>
<p>You can view the final result and copy the code <a href="/post-content/onsale/" title="The final result of this post is here">at this link.</a><br />
<a href="/post-content/onsale/" title="View the completed result of this post" class="big-button">View<br />
Final Result</a></p>
<p><a href="/post-content/onsale/saleExample.zip" title="Download example files here" class="big-button">Download<br />
Example Files</a></p>
<p>I am writing an article about a more advanced way to do this, and it will be posted soon. So check back within the next week!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/israeljernigan?a=DyO4CDuxc7w:2TxWsyc2-I8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=DyO4CDuxc7w:2TxWsyc2-I8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=DyO4CDuxc7w:2TxWsyc2-I8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=DyO4CDuxc7w:2TxWsyc2-I8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=DyO4CDuxc7w:2TxWsyc2-I8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=DyO4CDuxc7w:2TxWsyc2-I8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=DyO4CDuxc7w:2TxWsyc2-I8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=DyO4CDuxc7w:2TxWsyc2-I8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=DyO4CDuxc7w:2TxWsyc2-I8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=DyO4CDuxc7w:2TxWsyc2-I8:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/israeljernigan/~4/DyO4CDuxc7w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.israeljernigan.com/reusing-images-and-repetitive-content-with-css/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.israeljernigan.com/reusing-images-and-repetitive-content-with-css</feedburner:origLink></item>
		<item>
		<title>Help for bugs/issues with CSS and Internet Explorer</title>
		<link>http://feedproxy.google.com/~r/israeljernigan/~3/vFOz8PvwaOY/help-for-bugsissues-with-css-and-internet-explorer</link>
		<comments>http://www.israeljernigan.com/help-for-bugsissues-with-css-and-internet-explorer#comments</comments>
		<pubDate>Fri, 09 Nov 2007 15:12:56 +0000</pubDate>
		<dc:creator>Israel Jernigan</dc:creator>
				<category><![CDATA[Accessability]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.israeljernigan.com/help-for-bugsissues-with-css-and-internet-explorer</guid>
		<description>This is an attempt at creating a list of known issues/bugs with Internet Explorer and CSS, and documentation/help for those bugs. I hope that you find it helpful. I&amp;#8217;ve been needing to research some of these, so I thought I should document and share. Feel free to submit your finds as well.
Articles / Websites to [...]</description>
			<content:encoded><![CDATA[<p>This is an attempt at creating a list of known issues/bugs with Internet Explorer and CSS, and documentation/help for those bugs. I hope that you find it helpful. I&#8217;ve been needing to research some of these, so I thought I should document and share. Feel free to submit your finds as well.</p>
<h3>Articles / Websites to Help you Learn More</h3>
<ul>
<li>hasLayout (you should learn about this)
<ul>
<li><a href="http://www.satzansatz.de/cssd/onhavinglayout.html" title="What hasLayout is and why we need to know." target="_blank">hasLayout explained</a></li>
<li><a href="http://www.positioniseverything.net/explorer/inherited_margin.html" title="Documentation of hasLayout by Microsoft" target="_blank">Microsoft documentation on hasLayout</a></li>
</ul>
</li>
</ul>
<p><span id="more-18"></span></p>
<ul>
<li>Testing Bugs
<ul>
<li><a href="http://www.brunildo.org/test/" title="Simple and easy to see live examples." target="_blank">Simple live examples of issues involving IE</a></li>
<li><a href="http://www.positioniseverything.net/index.php" title="Definitly a great resource for new bugs" target="_blank">User submitted and Site related demos</a> (Very well explained)</li>
</ul>
</li>
<li>What&#8217;s been fixed in IE 7
<ul>
<li><a href="http://blogs.msdn.com/ie/archive/2005/07/29/445242.aspx" title="Microsoft developer blog list of bugs fixed" target="_blank">List on microsoft developer blog of known IE 6 bugs that are fixed</a> (Not a comprehensive list)</li>
</ul>
</li>
<li>Lists of bugs/issues
<ul>
<li><a href="http://www.macedition.com/cb/ie5macbugs/index.html" title="Help on figuring out IE5 bugs" target="_blank">Help on figuring out IE5 Mac bugs</a></li>
<li><a href="http://www.gtalbot.org/BrowserBugsSection/MSIE6Bugs/" title="IE6 bugs, very big list.">Another list of IE bugs with a short description explaining each.</a></li>
<li><a href="http://www.quirksmode.org/bugreports/" title="Great resource of documentation on bugs" target="_blank">User submitted list of issues and bugs</a> (kept current, not just IE)</li>
<li><a href="http://www.gtalbot.org/BrowserBugsSection/" title="Very nice long list of IE bugs" target="_blank">List of links to sites about bugs</a></li>
<li><a href="http://www.positioniseverything.net/explorer.html" title="Great resource for figuring out where to go." target="_blank">Guides on what to do and how to fix issues with IE </a></li>
<li><a href="http://websitetips.com/css/solutions/" title="Kind of confusing list of resources, but the resources are good" target="_blank">Not easy to navigate, but a good list of resources for issues with browsers</a></li>
</ul>
</li>
<li>CSS guides and tutorials
<ul>
<li><a href="http://www.thenoodleincident.com/tutorials/css/index.html" title="Guides on learning CSS" target="_blank">Clean and easy to read guides about CSS</a></li>
<li><a href="http://www.positioniseverything.net/index.php" title="Great website for finding your problem" target="_blank">Articles and Guides on how to solve IE bugs</a></li>
<li><a href="http://www.communitymx.com/content/article.cfm?cid=C37E0" title="A good website to help find where you need to go with your CSS" target="_blank">How to figure out which IE bug you have</a></li>
<li><a href="http://www.zeldman.com/2006/10/27/ie7fixes1/" title="Part 1 of the series, but quite insitful for figuring out IE" target="_blank">Some more current examples of how to solve bugs in IE</a></li>
</ul>
</li>
<li>Reporting Bugs/Forums about Bugs
<ul>
<li><a href="http://www.quirksmode.org/bugreports/" title="One of the best resources I've found for browser bugs" target="_blank">Submit your finds, search for issues</a> (quite comprehensive, very helpful)</li>
<li><a href="http://webbugtrack.blogspot.com/" title="User submitted and reported bugs and issues with all browsers" target="_blank">Web Bug Track, user submitted</a> (great rundown of specific issues)</li>
</ul>
</li>
</ul>
<p>I hope these provide you with a great resource for figuring out those ridiculous Internet Explorer bugs. They have helped me. <img src='http://www.israeljernigan.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/israeljernigan?a=vFOz8PvwaOY:NJ7lJ3W0JXY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=vFOz8PvwaOY:NJ7lJ3W0JXY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=vFOz8PvwaOY:NJ7lJ3W0JXY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=vFOz8PvwaOY:NJ7lJ3W0JXY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=vFOz8PvwaOY:NJ7lJ3W0JXY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=vFOz8PvwaOY:NJ7lJ3W0JXY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=vFOz8PvwaOY:NJ7lJ3W0JXY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=vFOz8PvwaOY:NJ7lJ3W0JXY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=vFOz8PvwaOY:NJ7lJ3W0JXY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=vFOz8PvwaOY:NJ7lJ3W0JXY:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/israeljernigan/~4/vFOz8PvwaOY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.israeljernigan.com/help-for-bugsissues-with-css-and-internet-explorer/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.israeljernigan.com/help-for-bugsissues-with-css-and-internet-explorer</feedburner:origLink></item>
		<item>
		<title>The Lawsuit Against Target And Accessibility Rules</title>
		<link>http://feedproxy.google.com/~r/israeljernigan/~3/GW490h5daAk/the-lawsuit-against-target-and-accessibility-rules</link>
		<comments>http://www.israeljernigan.com/the-lawsuit-against-target-and-accessibility-rules#comments</comments>
		<pubDate>Tue, 06 Nov 2007 15:28:54 +0000</pubDate>
		<dc:creator>Israel Jernigan</dc:creator>
				<category><![CDATA[Accessability]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[target]]></category>
		<category><![CDATA[web standards]]></category>

		<guid isPermaLink="false">http://www.israeljernigan.com/the-lawsuit-against-target-and-accessibility-rules</guid>
		<description>So I&amp;#8217;ve been trying to follow the lawsuit against Target. And I remember when I first heard about it I started thinking, &amp;#8220;I wonder where this will lead,&amp;#8221; hoping that it wouldn&amp;#8217;t create a bunch of rules and regulations I have to abide by when creating websites.
There are plenty of standards that I try to [...]</description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been trying to follow the <a href="http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;articleId=9041002&amp;intsrc=news_ts_head" title="A recent news story about the lawsuit" target="_blank">lawsuit against Target</a>. And I remember <a href="http://www.boxofchocolates.ca/archives/2006/02/09/taking-aim-at-target-dot-com" title="One of the first posts about the lawsuit." target="_blank">when I first heard about it</a> I started thinking, &#8220;I wonder where this will lead,&#8221; hoping that it wouldn&#8217;t create a bunch of rules and regulations I have to abide by when creating websites.</p>
<p>There are plenty of standards that I try to abide by as a web developer.</p>
<ul>
<li><a href="http://www.w3.org/Style/CSS/" title="Here's what all the fuss is about with Cascading Style Sheets." target="_blank">CSS</a> &#8211; <a href="http://jigsaw.w3.org/css-validator/" title="CSS Validation Tool" target="_blank">http://jigsaw.w3.org/css-validator/</a></li>
<li><a href="http://validator.w3.org/feed/about.html" title="What a feed validator does and why." target="_blank">RSS</a> &#8211; <a href="http://validator.w3.org/feed/" title="RSS feed Validation Tool" target="_blank">http://validator.w3.org/feed/</a></li>
<li><a href="http://www.w3.org/TR/xhtml1/" title="What is XHTML? It is explained in gross detail here." target="_blank">XHTML </a>- <a href="http://validator.w3.org/" title="HTML Validaiton Tool" target="_blank">http://validator.w3.org/</a></li>
<li><a href="http://validator.w3.org/docs/checklink.html" title="What the Link Checker does." target="_blank">Link Checker</a> &#8211; <a href="http://validator.w3.org/checklink" title="Link Validaiton Tool" target="_blank">http://validator.w3.org/checklink/</a></li>
<li><a href="http://www.access-board.gov/sec508/standards.htm" title="The standards used when creating things for federal means must be usable by people with disabilities." target="_blank">Section 508</a> &#8211; <a href="http://www.contentquality.com/" title="Section 508 Validaiton Tool" target="_blank">http://www.contentquality.com/</a></li>
<li><a href="http://www.w3.org/TR/WCAG10/" title="How to make websites accessable to people with disabilities." target="_blank">WCAG</a> 1, 2 &amp; 3 &#8211; <a href="http://www.contentquality.com/fulloptions.asp?rptmode=2" title="WCAG Validation Tool for accessability" target="_blank">http://www.contentquality.com/</a></li>
</ul>
<p>My fear is that this will open a door for the government to have more control over how we can use the internet and what we can use it for. There are already standards in place, like those above, that I (and many other web developers) try and abide by. I hope that Target ignoring these standards won&#8217;t create rules that infringe upon my freedom to create websites.<br />
<span id="more-17"></span><br />
I&#8217;ve heard rumors of there being lobbying for all adult websites to have one domain suffix, like .xxx. I&#8217;m not necessarily for adult related websites or their content, but I am against restricting what can be on the internet. To me it would be restricting the ultimate public communication.</p>
<p>If a website doesn&#8217;t want to be accessible to a certain  people group or people who are disabled, that&#8217;s their choice. They&#8217;ll just lose some of their customer base. Now if they are creating something that is to be used by and for the government, they need to abide by that government&#8217;s rules. But there is a fine line where that begins and ends.</p>
<p>My argument is this. Does a Spanish newspaper have to create an English version of their newspaper, or even a braille version for that matter?   Will I be able to view a website from the United Kingdom from my house in New York if it doesn&#8217;t conform to U.S. standards? Where is the line  that dictates how much or how little is required? The more the government gets involved because of stupid mistakes or <span class="secondary-bf"></span><span class="secondary-bf">inconsiderations</span> by big companies, the more leeway the government gets into controlling the internet. I&#8217;m not saying that a certain people group doesn&#8217;t have rights, but when did the world wide web become a place of regulations and restrictions?</p>
<p>Taxing  domains, restricting what can be put on a certain domain suffix (.com), or making me cater to a certain people group is dangerous ground for the government. Will the future hold that I have to make my website accessible to multiple languages if I host my website in U.S. vs. somewhere else ? If I have video on my website will I have to have a text version as well? Will there be restrictions as to what I can write in a blog post? I hope that this lawsuit will end well, but I fear that, very soon, restrictions will limit the internet more than I&#8217;d like.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/israeljernigan?a=GW490h5daAk:9vsQ9ki36CQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=GW490h5daAk:9vsQ9ki36CQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=GW490h5daAk:9vsQ9ki36CQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=GW490h5daAk:9vsQ9ki36CQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=GW490h5daAk:9vsQ9ki36CQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=GW490h5daAk:9vsQ9ki36CQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=GW490h5daAk:9vsQ9ki36CQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=GW490h5daAk:9vsQ9ki36CQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=GW490h5daAk:9vsQ9ki36CQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=GW490h5daAk:9vsQ9ki36CQ:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/israeljernigan/~4/GW490h5daAk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.israeljernigan.com/the-lawsuit-against-target-and-accessibility-rules/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.israeljernigan.com/the-lawsuit-against-target-and-accessibility-rules</feedburner:origLink></item>
		<item>
		<title>Using PHP to Easily Create Radio Lists and Drop Downs</title>
		<link>http://feedproxy.google.com/~r/israeljernigan/~3/XdQCVlgnUlg/using-php-to-easily-create-radio-lists-and-drop-downs</link>
		<comments>http://www.israeljernigan.com/using-php-to-easily-create-radio-lists-and-drop-downs#comments</comments>
		<pubDate>Mon, 22 Oct 2007 16:05:44 +0000</pubDate>
		<dc:creator>Israel Jernigan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[drop down]]></category>
		<category><![CDATA[php integration]]></category>
		<category><![CDATA[radio list]]></category>

		<guid isPermaLink="false">http://www.israeljernigan.com/using-php-to-easily-create-radio-lists-and-drop-downs</guid>
		<description>One thing that I find myself doing continuously is creating forms. From forms that submit info into a database, to forms that send emails. I constantly am doing repetitive processes.
Most of the time I am using server side PHP code to create or validate part of the form. So I created a few server side [...]</description>
			<content:encoded><![CDATA[<p>One thing that I find myself doing continuously is creating forms. From forms that submit info into a database, to forms that send emails. I constantly am doing repetitive processes.</p>
<p>Most of the time I am using server side PHP code to create or validate part of the form. So I created a few server side functions that I have found help my process along. Two things that I seem to need often are <strong>radio lists</strong> and <strong>drop down options</strong>.  I needed them to be as dynamic as possible. (To work with javascript, labels, css, validation, and database information)</p>
<p>I created two functions: one for radio buttons, and one for drop down options. I am going to list the entire functions and than explain the different aspects of them.<br />
<span id="more-15"></span></p>
<h3>Radio List Function</h3>
<pre>function Fradio($a,$name,$c=FALSE,$o=FALSE){
//a=array(array('v'=&gt;'value','l'=&gt;'label','o'=&gt;'extra/options/javascript'))
//name=radio form's name
//c=choice
//o=other values [true/false]  

$x=0;//the count

if(is_array($a)){

if(!$o){//if no individual options for each input field, like javascript

foreach($a as $v){

$x=$x+1;

$selected = ($c == $v['v']) ? 'checked="checked"' : '';  

$line .= ' &lt;label for="'.$name.$x.'"&gt;

&lt;input type="radio" name="'.$name.'" id="'.$name.$x.'" '.$selected.' value="'.$v['v'].'" /&gt;

'.$v['l'].'

&lt;/label&gt;';

}

}else{

foreach($a as $v){

$selected = ($c == $v['v']) ? 'checked="checked"' : '';

$line .= ' &lt;label for="'.$name.$x.'"&gt;

&lt;input type="radio" name="'.$name.'" id="'.$name.$x.'" '.$selected.' value="'.$v['v'].'" '.$v['o'].' /&gt;

'.$v['l'].'

&lt;/label&gt;';

}

}

return $line;

}

return false;

}</pre>
<h3>Drop Down Function</h3>
<pre>function Fdd($a,$name,$c=FALSE,$o=FALSE){
//a=array(array('v'=&gt;'value','l'=&gt;'label'))
//name=dropdown form's name
//c=choice
//o=other values [extra/options/javascript]  

if(is_array($a)){  

$line = '&lt;select id="'.$name.'" name="'.$name.'" '.$o.'&gt;';

foreach($a as $v){

$selected = ($c == $v['v']) ? 'selected="selected"' : '';

$line .= '&lt;option value="'.$v['v'].'" '.$selected.' &gt;'.$v['l'].'&lt;/option&gt;';

}

$line .= '&lt;/select&gt;';

return $line;

}

return false;

}</pre>
<p>They work using arrays of information, I thought this would be the best way for me to create data and cycle through it. I will start by showing you a basic array of information, and what basic information the functions require.</p>
<p>To make this easier to read I&#8217;ve separated each array(choice) into a variable. You can easily create this array from a mysql result set.</p>
<pre>$choice1 = array('v'=&gt;'value1','l'=&gt;'label1','o'=&gt;'option1');

$choice2 = array('v'=&gt;'value2','l'=&gt;'label2','o'=&gt;'option2');

$choice3 = array('v'=&gt;'value3','l'=&gt;'label3','o'=&gt;'option3');

$array = array($choice2,$choice2,$choice3);</pre>
<p>If you were trying to use mysql you could do something like this.</p>
<pre>while($row = mysql_fetch_row($resultset)){

$array[] = array('v'=&gt;$row["value"],'l'=&gt;$row["label"],'o'=&gt;$row["option"]);

}</pre>
<p>Than you can store your radio list in a variable or simply display the function.</p>
<pre>echo Fradio($array,'radioName','choice selected');</pre>
<p>Now there are four variables that can be passed into this function and two of them are required. From left to right they are this: the array containing the values for the form tag(required), the name being used for the form tag(required), the choice selected(can be used for cms, or error correction), and lastly set this to true if any extra options are to be used(rarely needed, but allows for the use of javascript).</p>
<p>Both functions use the same format except on one part. Because of the way drop downs work, you cannot use javascript on each individual option tag(it won&#8217;t work correctly in all browsers, and doesn&#8217;t validate). Instead you must use it on the select tag. For the drop down function, the variable isn&#8217;t a boolean value, it&#8217;s the actual javascript. There is no need to put it in the array like the radio function. The radio function accepts a boolean value for that variable, and you actually put the javascript in the array along with the other radio button info.</p>
<p>Both functions will return false if the first variable is not an array. If you would like to comment or make suggestions feel free to post below. Feel free to use this, and I hope it helps.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/israeljernigan?a=XdQCVlgnUlg:dbYWp4t8YW4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=XdQCVlgnUlg:dbYWp4t8YW4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=XdQCVlgnUlg:dbYWp4t8YW4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=XdQCVlgnUlg:dbYWp4t8YW4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=XdQCVlgnUlg:dbYWp4t8YW4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=XdQCVlgnUlg:dbYWp4t8YW4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=XdQCVlgnUlg:dbYWp4t8YW4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=XdQCVlgnUlg:dbYWp4t8YW4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=XdQCVlgnUlg:dbYWp4t8YW4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=XdQCVlgnUlg:dbYWp4t8YW4:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/israeljernigan/~4/XdQCVlgnUlg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.israeljernigan.com/using-php-to-easily-create-radio-lists-and-drop-downs/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.israeljernigan.com/using-php-to-easily-create-radio-lists-and-drop-downs</feedburner:origLink></item>
		<item>
		<title>Today is Blog Action Day – The Environment</title>
		<link>http://feedproxy.google.com/~r/israeljernigan/~3/yiHnY3fwsQw/today-is-blog-action-day-the-environment</link>
		<comments>http://www.israeljernigan.com/today-is-blog-action-day-the-environment#comments</comments>
		<pubDate>Mon, 15 Oct 2007 19:52:42 +0000</pubDate>
		<dc:creator>Israel Jernigan</dc:creator>
				<category><![CDATA[Environment]]></category>
		<category><![CDATA[awareness]]></category>
		<category><![CDATA[blog action day]]></category>

		<guid isPermaLink="false">http://www.israeljernigan.com/today-is-blog-action-day-the-environment</guid>
		<description>Today I am writing about the environment. I am trying to become more environmentally aware, and have been trying to think of some ways that I can do that in my profession. So I have decided to write about it for Blog Action Day.
One simple thing that I&amp;#8217;ve started doing is using hosting that has [...]</description>
			<content:encoded><![CDATA[<p>Today I am writing about the environment. I am trying to become more environmentally aware, and have been trying to think of some ways that I can do that in my profession. So I have decided to write about it for <a href="http://www.blogactionday.org" title="Blog Action Day: To Raise Awareness to the World" target="_blank">Blog Action Day</a>.</p>
<p><a href="http://www.dreamhost.com/green.cgi" title="Green Web Hosting by Dreamhost"><img src="https://secure.newdream.net/green1.gif" alt="Green Web Hosting! This site hosted by DreamHost." height="32" width="100" /></a>One simple thing that I&#8217;ve started doing is using hosting that has gone green.  I&#8217;ve found this is really easy, and doesn&#8217;t require that much work on my part, but it can make a huge difference. You can even use it to promote your website or as a selling tool to your client.</p>
<h3>Be More Aware</h3>
<p>I&#8217;ve had a desire to be more recycle minded. So I&#8217;ve tried to take that more into account with what I do and where I work. So I&#8217;ve started to do a few things&#8230;<br />
<span id="more-14"></span></p>
<ol>
<li style="padding-bottom: 1em">I sometimes eat breakfast at work, so I try and use real dishes whenever I can. I try and <a href="http://answers.yahoo.com/question/index?qid=20070521211056AARzdf2" title="Answers about stryofoam" target="_blank">never</a> use <a href="http://www.computerworld.com/blogs/node/1960" title="Some reasons why" target="_blank">styrofoam</a>. You cannot easily recycle stryofoam.</li>
<li style="padding-bottom: 1em">When leaving the office or home for long periods I unplug all of my appliances. That includes computers, printers, kitchenware, tv, etc. Anything that can suck electricity while it&#8217;s &#8216;off&#8217; is something I have been trying to be more mindful of.</li>
<li style="padding-bottom: 1em">Also recycle <a href="http://www.recycle4charity.com/store.tpl?rnd=7795&amp;cart=1ABEF64E-B664-493F-91A4-4957485D10BC" title="Take out the ink!" target="_blank">printer cartridges</a> and <a href="http://www.recycle4charity.com/Results.tpl?rnd=4648&amp;cart=1ABEF64E-B664-493F-91A4-4957485D10BC&amp;category=9&amp;startat=1" title="Recycle those cell phones!" target="_blank">cell phones</a>. This is a simple thing you can do. You might even be able to find an office supply store that have drop boxes for just this purpose.</li>
<li style="padding-bottom: 1em">A great way to save is to use email for more than just personal messages. Use it for invoicing, record keeping, organization; most email applications have great calendar and task features that you can use instead of those paper substitutes.</li>
<li style="padding-bottom: 1em">And lastly I try and encourage my clients to use ftp when transferring files rather than on a cd through the mail. I&#8217;ve found that it&#8217;s not only faster, but requires less work to do. No need to make last minute trips to the post office Just upload and go.</li>
</ol>
<h3>Change is good</h3>
<p>So those are a few tips I hope will start you thinking about what you can do in your personal life to make a change to help the environment. Be open to change. Be aware that the earth is changing. Be mindful of what you can do.Here are some more <a href="http://freelanceswitch.com/working/29-simple-ways-to-become-a-more-environmentally-friendly-freelancer-help-us-donate-500-to-charity/" title="Simple Ideas to Change Your World" target="_blank">great tips</a> that you should check out. They are really good ideas that you can easily apply to your everyday routine. Enjoy!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/israeljernigan?a=yiHnY3fwsQw:-O6TpGrD4bU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=yiHnY3fwsQw:-O6TpGrD4bU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=yiHnY3fwsQw:-O6TpGrD4bU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=yiHnY3fwsQw:-O6TpGrD4bU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=yiHnY3fwsQw:-O6TpGrD4bU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=yiHnY3fwsQw:-O6TpGrD4bU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=yiHnY3fwsQw:-O6TpGrD4bU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=yiHnY3fwsQw:-O6TpGrD4bU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=yiHnY3fwsQw:-O6TpGrD4bU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=yiHnY3fwsQw:-O6TpGrD4bU:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/israeljernigan/~4/yiHnY3fwsQw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.israeljernigan.com/today-is-blog-action-day-the-environment/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.israeljernigan.com/today-is-blog-action-day-the-environment</feedburner:origLink></item>
		<item>
		<title>CSS Off Contest – Wikinetic – The Judging Block</title>
		<link>http://feedproxy.google.com/~r/israeljernigan/~3/I9nMD1Gurxs/css-off-contest-wikinetic-the-judging-block</link>
		<comments>http://www.israeljernigan.com/css-off-contest-wikinetic-the-judging-block#comments</comments>
		<pubDate>Fri, 12 Oct 2007 13:45:22 +0000</pubDate>
		<dc:creator>Israel Jernigan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Off]]></category>
		<category><![CDATA[contest]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[cssoff.com]]></category>

		<guid isPermaLink="false">http://www.israeljernigan.com/css-off-contest-wikinetic-the-judging-block</guid>
		<description>So, I love critique. It is always unexpected, and you learn from it. Even if you hate to admit it, you do learn. That&amp;#8217;s why I love CSS Off so much! But now to recap some things that were said about my entry. Here is the link where my critique is, I&amp;#8217;m the last.
But first, [...]</description>
			<content:encoded><![CDATA[<p>So, I love critique. It is always unexpected, and you learn from it. Even if you hate to admit it, you do learn. That&#8217;s why I love CSS Off so much! But now to recap some things that were said about my entry. <a href="http://cssoff.com/entries/wikinetic/index.php" title="I'm number 8 on the list" target="_blank">Here is the link</a> where my critique is, I&#8217;m the last.</p>
<p>But first, <strong>my entry was the smallest size! </strong>I&#8217;d say I&#8217;m proud of that. <img src='http://www.israeljernigan.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Most of the things I knew would be on there. Like, late, not working in safari, bad border on ratings, bad text-resizing, css not validating because of font instead of font-family(stupid mistake), basic browser inconsistencies, and hard to read code. ugh&#8230;thanks for pointing those out guys.<br />
<span id="more-13"></span><br />
Some pluses that were given to my attempt, were much appreciated.  Like, my use of tables(I used them for showing data, not layout), my integration of a print stylesheet, attempt at drop shadow on border of table, good use of header tags(h1, h3), and use of ems for font-size. I&#8217;m glad the judges paid so close attention to the details.</p>
<p>It was mentioned by one of the judges that the site didn&#8217;t work on the iPhone. That made me laugh. Now if only I had the money to buy an iPhone. But he did say that they were not judging the way it looked on the iPhone. Which I am glad they didn&#8217;t.</p>
<p>Well, after reading what they had to say, I had to take a step back and figure out why those things happened. And the first thing that came to mind was time. These competitions are becoming harder for me because of that. I love the challenge, but it&#8217;s so hard to take an entire day(usually a weekday) and make a website. I guess I want to be with my wife more than I want to spend my day doing this. (she doesn&#8217;t usually want me to spend my entire Saturday coding when I do that all day during the week)</p>
<p>I get so passionate when I am coding css. I love it. The diversity, the challenge, the unique ideas, the pain, and the attempt at perfection. I can&#8217;t help but enjoy every minute of it. This is what I love, and I think that&#8217;s weird.</p>
<p>Well if you want to see my entry, you can <a href="http://cssoff.com/entries/wikinetic/08-0916-1202am-israel/index.htm" title="This is my entry for the CSS Off contest" target="_blank">check it out here</a>. Check it out, and look for to my next entry.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/israeljernigan?a=I9nMD1Gurxs:t83gjO5LHaM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=I9nMD1Gurxs:t83gjO5LHaM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=I9nMD1Gurxs:t83gjO5LHaM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=I9nMD1Gurxs:t83gjO5LHaM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=I9nMD1Gurxs:t83gjO5LHaM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=I9nMD1Gurxs:t83gjO5LHaM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=I9nMD1Gurxs:t83gjO5LHaM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=I9nMD1Gurxs:t83gjO5LHaM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=I9nMD1Gurxs:t83gjO5LHaM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=I9nMD1Gurxs:t83gjO5LHaM:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/israeljernigan/~4/I9nMD1Gurxs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.israeljernigan.com/css-off-contest-wikinetic-the-judging-block/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.israeljernigan.com/css-off-contest-wikinetic-the-judging-block</feedburner:origLink></item>
		<item>
		<title>Cool CSS Matted Border Effect</title>
		<link>http://feedproxy.google.com/~r/israeljernigan/~3/ipwklsDEyP8/cool-css-double-border-effect</link>
		<comments>http://www.israeljernigan.com/cool-css-double-border-effect#comments</comments>
		<pubDate>Thu, 04 Oct 2007 20:28:57 +0000</pubDate>
		<dc:creator>Israel Jernigan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[border]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.israeljernigan.com/cool-css-double-border-effect</guid>
		<description>So I thought I would share a simple trick that creates a really clean effect. It&amp;#8217;s what I call a double border. I don&amp;#8217;t like adding borders onto the actual images I put on websites, so I&amp;#8217;ve experimented with using css to create the borders. What I&amp;#8217;ve found is that css rocks at doing this!
Basically [...]</description>
			<content:encoded><![CDATA[<p class="left" style="border: 1px solid black; padding: 2px; background-color: #efefef; width: 75px; display: block; margin-right: 1.5em"><img src="http://israeljernigan.com/post-content/border/me.png" alt="Cool Border" height="100" width="75" /></p>
<p>So I thought I would share a simple trick that creates a really clean effect. It&#8217;s what I call a double border. I don&#8217;t like adding borders onto the actual images I put on websites, so I&#8217;ve experimented with using css to create the borders. What I&#8217;ve found is that css rocks at doing this!</p>
<p>Basically you put a <strong>&lt;div&gt;</strong> tag around the image you want to add a border to. And add css to the div, not the image. That way we can still control the image, but we have much more variation with what we can do with borders.</p>
<p>Here is what the<strong> &lt;div&gt;</strong> and <strong>&lt;img&gt;</strong> html would look like.<br />
<span id="more-11"></span></p>
<pre>
&lt;div class="border-cool-out"&gt;
&lt;img src="/post-content/border/me.png" alt="Cool Border" »»
height="100" width="75" /&gt;
&lt;/div&gt;</pre>
<p>And then the really simple css for the double border. basically all you need to do is give the class the width of the image, and however much border you want. Than add a background-color and padding. That will create the extra border to give it a double border effect.</p>
<pre>
&lt;style&gt;
.border-cool-out{
  border:1px solid black;
  background-color:#efefef;
  width:75px;
  padding:2px;
}
&lt;/style&gt;</pre>
<p>I hope you enjoyed this really easy, but cool way to create stylish and great looking borders. Here is another example.</p>
<p style="border: 1px solid #890001; padding: 5px; background-color: #efefef; width: 350px; display: block; height: 100px; font-size: 1em; color: #999999"> <img src="http://israeljernigan.com/post-content/border/me2.png" alt="Cool Border" style="float: left; margin-right: 1.5em" height="100" width="75" />I thought it might be cool to show an interesting example of how this could be used. Other than as a double border. Enjoy! <img src='http://www.israeljernigan.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/israeljernigan?a=ipwklsDEyP8:gShU1I0h7d0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=ipwklsDEyP8:gShU1I0h7d0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=ipwklsDEyP8:gShU1I0h7d0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=ipwklsDEyP8:gShU1I0h7d0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=ipwklsDEyP8:gShU1I0h7d0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=ipwklsDEyP8:gShU1I0h7d0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=ipwklsDEyP8:gShU1I0h7d0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=ipwklsDEyP8:gShU1I0h7d0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=ipwklsDEyP8:gShU1I0h7d0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=ipwklsDEyP8:gShU1I0h7d0:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/israeljernigan/~4/ipwklsDEyP8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.israeljernigan.com/cool-css-double-border-effect/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.israeljernigan.com/cool-css-double-border-effect</feedburner:origLink></item>
		<item>
		<title>Learning to create css layout: Part 2 of 2</title>
		<link>http://feedproxy.google.com/~r/israeljernigan/~3/mFGeNU4muBs/learning-to-create-css-layout-part-2-of-2</link>
		<comments>http://www.israeljernigan.com/learning-to-create-css-layout-part-2-of-2#comments</comments>
		<pubDate>Tue, 25 Sep 2007 21:12:18 +0000</pubDate>
		<dc:creator>Israel Jernigan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.israeljernigan.com/learning-to-create-css-layout-part-2-of-2</guid>
		<description>Okay, so this has taken awhile for me to get around to writing.
This is the second part to the learning to create css layout series. This part focuses on how to make the menu. The last part left off here.
We are going to create the menu from an unordered list. The main reason we do [...]</description>
			<content:encoded><![CDATA[<p>Okay, so this has taken awhile for me to get around to writing.</p>
<p>This is the second part to the learning to create css layout series. This part focuses on how to make the menu. The last part <a href="http://www.israeljernigan.com/post-content/tutorial/basic_css_02.htm" title="First part of series" target="_blank">left off here</a>.</p>
<p>We are going to create the menu from an unordered list. The main reason we do this, is because of semantics. When css is disabled or someone is using a screen reader it&#8217;s helps in navigation. But also it is because the menu is a list or grouping of links.</p>
<p>So lets start with the xhtml.</p>
<pre>
&lt;ul&gt;
&lt;li&gt;&lt;a href="#" class="active"&gt;Main 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;Main 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;Main 3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;Main 4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#" class="last"&gt;Main 5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>Which is pretty simple. Much cleaner than separate &lt;td&gt; for each link. <span id="more-10"></span>Each link is nested inside a list tag. And whichever page you are on the anchor tag has a class of {active} attributed to it. This is strictly for declaring css on that element to help distinguish it from the other menu items. And you might have noticed a class of {last}, which is being used for controlling graphical elements on the end anchor tag.</p>
<p>That&#8217;s pretty simple and it can be controlled quite extensively with css. Here is the css that controls the way the unordered list is setup and displayed.</p>
<pre>
#menu ul{
margin: 0;
padding: 0;
width: auto;
}
#menu ul li{
display:inline;
}</pre>
<p>We have put the unordered list inside the {menu} div. We can set specific rules for just this div by attributing <strong>#menu</strong> before all of the elements we want to control inside that div. That way it won&#8217;t affect any other tags on the page that are not in that div.</p>
<p>We get rid of the default values that are atrributed to an unordered list by setting <strong>margin</strong> and <strong>padding</strong> to 0. Also each list item inside the unordered list is set to <strong>display inline</strong> instead of block. What this does is align the elements to sit beside each other instead of on top of each other.</p>
<p>Now here is the gritty part of the menu, and where you can really effect the colors, size and many other aspects.</p>
<pre>
#menu a{
border:1px solid #333;
border-right: none;
color: black;
display:block;
float:left;
margin-left:-1px;
padding:5px 0;
text-align:center;
text-decoration: none;
width:20%;
}
#menu a.last{
border-right:1px solid #333;
margin-right:-1px;
}
#menu a:hover{
background-color:#181818;
color:#EAEAEA;
}
#menu a.active{
background-color:#181818;
color:#EAEAEA;
}�</pre>
<p>Okay, hopefully you are not overwhelmed. I will try and explain the important parts of what this css does. First we assign a <strong>border</strong> to each link as well as set the <strong>right border</strong> to be 0px by using the word <strong>none</strong>. This makes the border be the same width across the entire menu. And because we got rid of the right border, the last anchor tag needs to have it put back on. So that&#8217;s where <strong>a.last</strong> comes to play. We apply a <strong>1px border</strong> back onto that element.</p>
<p>Normally anchor tags are inline elements, but we want them make them have cool hover states and have the entire height of the link clickable. So, we need to set <strong>display to block</strong>, and have them <strong>float left</strong>. What this does is allow you to set a height and makes the extra space on the element clickable, not just the text. Which is really user friendly, and allows for easier navigation.</p>
<p>When working with css and making things line up correctly you need to be aware of your elements width. Because we added a border to each link we need to offset the width of the element so that it is what it was before the border. Since each element has 1px extra, because of the border, we can set the <strong>margin-left</strong> to -1px. And on the <strong>a.last</strong> element we can add margin-right -1px (since it needs 2px taken off).</p>
<p>The biggest reason for this is so when we set the width of the links it is correct. Because we have 5 links we can set the <strong>width to %20</strong>. If we hadn&#8217;t taken off 1px with <strong>margin</strong>, the links would not display correctly.</p>
<p>Now we just add some simple decoration with <strong>padding</strong>. And we are using <strong>shorthand</strong> css here. The first number effects the top and bottom, and the second number effects left and right. Then we add some colors and set the :hover and :active <em>pseudo elements</em>. So, when you rollover the links, they behave like you expect.</p>
<p>It&#8217;s that simple. Once you have created a few sites using css. You will begin to understand how easy it is to effect entire websites.<br />
Hopefully this tutorial has shed some light on how to create a css layout that you would normally have done with tables. The final example has some extra css thrown in to help show how to create a more complete look.</p>
<p><a href="/post-content/tutorial/basic_css.htm" class="big-button" title="View live example">View Completed Example</a></p>
<p>If you have any suggestions or questions please feel free to share your thoughts.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/israeljernigan?a=mFGeNU4muBs:y6T3AlD0lc0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=mFGeNU4muBs:y6T3AlD0lc0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=mFGeNU4muBs:y6T3AlD0lc0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=mFGeNU4muBs:y6T3AlD0lc0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=mFGeNU4muBs:y6T3AlD0lc0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=mFGeNU4muBs:y6T3AlD0lc0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=mFGeNU4muBs:y6T3AlD0lc0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=mFGeNU4muBs:y6T3AlD0lc0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/israeljernigan?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/israeljernigan?a=mFGeNU4muBs:y6T3AlD0lc0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/israeljernigan?i=mFGeNU4muBs:y6T3AlD0lc0:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/israeljernigan/~4/mFGeNU4muBs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.israeljernigan.com/learning-to-create-css-layout-part-2-of-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.israeljernigan.com/learning-to-create-css-layout-part-2-of-2</feedburner:origLink></item>
	</channel>
</rss>
