<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Obvious In Hindsight</title>
	<atom:link href="http://obviousinhindsight.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://obviousinhindsight.wordpress.com</link>
	<description>Archive of tips, tricks and solutions for designers and programmers!</description>
	<lastBuildDate>Wed, 13 Jan 2010 02:21:04 +0000</lastBuildDate>
	<language></language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='obviousinhindsight.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Obvious In Hindsight</title>
		<link>http://obviousinhindsight.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://obviousinhindsight.wordpress.com/osd.xml" title="Obvious In Hindsight" />
	<atom:link rel='hub' href='http://obviousinhindsight.wordpress.com/?pushpress=hub'/>
		<item>
		<title>PHP: Using predefined variables in paths</title>
		<link>http://obviousinhindsight.wordpress.com/2010/01/13/php-using-predefined-variables-in-paths/</link>
		<comments>http://obviousinhindsight.wordpress.com/2010/01/13/php-using-predefined-variables-in-paths/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 02:21:04 +0000</pubDate>
		<dc:creator>obviousinhindsight</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[DOCUMENT_ROOT]]></category>
		<category><![CDATA[file path]]></category>
		<category><![CDATA[HTTP_HOST]]></category>
		<category><![CDATA[image path]]></category>
		<category><![CDATA[include file]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[predefined variable]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[server root]]></category>
		<category><![CDATA[variable]]></category>
		<category><![CDATA[web root]]></category>

		<guid isPermaLink="false">http://obviousinhindsight.wordpress.com/?p=147</guid>
		<description><![CDATA[Predefined variables can be used to replace specific parts of the paths of files or images. Predefined variable in a path for an include file It&#8217;s important to understand that the path for an include file is relative to the web server and not the web root where the home page is stored. The predefined [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=147&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Predefined variables can be used to replace specific parts of the paths of files or images.</p>
<h3>Predefined variable in a path for an include file</h3>
<p>It&#8217;s important to understand that the path for an include file is relative to the web server and not the web root where the home page is stored.</p>
<p>The predefined variable:</p>
<blockquote><p>$_SERVER['DOCUMENT_ROOT']</p></blockquote>
<p>It produces something like this:</p>
<blockquote><p>/home/yoursite/public_html</p></blockquote>
<p>Using it in a path:</p>
<blockquote><p>&lt;?php include($_SERVER['DOCUMENT_ROOT'].&#8221;/somefolder/somefile.html&#8221;); ?&gt;</p></blockquote>
<h3>Predefined variable for images</h3>
<p>This path is relative to the web root (unlike the path for the  include file).</p>
<p>The predefined variable:</p>
<blockquote><p>$_SERVER['HTTP_HOST']</p></blockquote>
<p>It produces something this:</p>
<blockquote><p>www.yoursite.com</p></blockquote>
<p>Using it in a path:</p>
<blockquote><p>&lt;img src=&#8221;&lt;?php echo $_SERVER['HTTP_HOST'];?&gt;/images/logo.png&#8221;&gt;</p></blockquote>
<p>Learn more about predefined variables here: <a href="http://php.net/manual/en/reserved.variables.php">http://php.net/manual/en/reserved.variables.php</a></p>
<p>Everything&#8217;s obvious in hindsight, eh?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/obviousinhindsight.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/obviousinhindsight.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/obviousinhindsight.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/obviousinhindsight.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/obviousinhindsight.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/obviousinhindsight.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/obviousinhindsight.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/obviousinhindsight.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/obviousinhindsight.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/obviousinhindsight.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/obviousinhindsight.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/obviousinhindsight.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/obviousinhindsight.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/obviousinhindsight.wordpress.com/147/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=147&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://obviousinhindsight.wordpress.com/2010/01/13/php-using-predefined-variables-in-paths/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc79b627f2088723c84b4cfaa4d79867?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">obviousinhindsight</media:title>
		</media:content>
	</item>
		<item>
		<title>Web Design: Absolute paths, document relative and root relative paths</title>
		<link>http://obviousinhindsight.wordpress.com/2010/01/13/web-design-absolute-document-relative-and-root-relative-paths/</link>
		<comments>http://obviousinhindsight.wordpress.com/2010/01/13/web-design-absolute-document-relative-and-root-relative-paths/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 01:54:59 +0000</pubDate>
		<dc:creator>obviousinhindsight</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[../]]></category>
		<category><![CDATA[absolute path]]></category>
		<category><![CDATA[document relative]]></category>
		<category><![CDATA[document relative path]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[folder]]></category>
		<category><![CDATA[forward slash]]></category>
		<category><![CDATA[hierarchy]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[relative path]]></category>
		<category><![CDATA[root relative]]></category>
		<category><![CDATA[root relative path]]></category>
		<category><![CDATA[subdirectories]]></category>
		<category><![CDATA[subdirectory]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[web root]]></category>

		<guid isPermaLink="false">http://obviousinhindsight.wordpress.com/?p=145</guid>
		<description><![CDATA[A path, in effect, is like a postal address. Paths generally lead to a file (e.g. image) or a folder (e.g. directory). Web root vs. document root A web root is the upper most layer of your website in which all files and subdirectories are stored. Generally this is where the home page is stored. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=145&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A path, in effect, is like a postal address. Paths generally lead to a file (e.g. image) or a folder (e.g. directory).</p>
<h3>Web root vs. document root</h3>
<p>A web root is the upper most layer of your website in which all files and subdirectories are stored. Generally this is where the home page is stored.</p>
<blockquote><p>http://www.somesite.com</p></blockquote>
<p>A document root is relative to the <em>location</em> of the document.</p>
<blockquote><p>http://www.somesite.com/somefolder/somefile.html</p></blockquote>
<p>Note: A document root and web root can be one and the same if the document is located in the web root. Both web roots and document roots can be defined either absolutely or relatively.</p>
<h3>Absolute path vs. relative path</h3>
<p>An absolute path is simply a complete path and always <em>starts</em> from the web root.</p>
<blockquote><p>http://www.somesite.com/images/apple.jpg</p></blockquote>
<p>A relative path is simply a short hand version of the absolute path. Usually you&#8217;re simply omitting the scheme (http), host (www), domain (www.somesite.com) and port (com). There are two ways of defining a relative path.</p>
<h3>Document relative path</h3>
<p>A document relative path is the more common type of relative paths. It&#8217;s important to note that there is no preceding forward slash.</p>
<blockquote><p>images/apple.jpg</p></blockquote>
<p>Such a path allows you to freely move up and down your sites hierarchy by adding &#8220;../&#8221; before the document relative path.</p>
<blockquote><p>&lt;img src=&#8221;../images/apple.jpg&#8221;&gt;</p></blockquote>
<p>The path becomes relative to the root above the document realtive path for every &#8220;../&#8221; added. The following will jump up three roots for example:</p>
<blockquote><p>&lt;img src=&#8221;../../../images/title.jpg&#8221;&gt;</p></blockquote>
<h3>Root relative paths</h3>
<p>A root relative path is relative to the web root where your overall home page resides. Such a path is useful for files that are to be universally included across an group of or all of your web pages (e.g. a header). A document relative path will not work if the location of the documents (web pages) vary. For this reason, the universality of the root relative path will do the trick. It&#8217;s important to note that there is no preceding forward slash.</p>
<blockquote><p>&lt;img src=&#8221;/images/title.jpg&#8221;&gt;</p></blockquote>
<h3>The preceding forward slash matters!</h3>
<p>It&#8217;s critical to understand that a preceding forward makes the difference between a document relative path and a root relative path.</p>
<p>Everything&#8217;s obvious in hindsight, eh?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/obviousinhindsight.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/obviousinhindsight.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/obviousinhindsight.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/obviousinhindsight.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/obviousinhindsight.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/obviousinhindsight.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/obviousinhindsight.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/obviousinhindsight.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/obviousinhindsight.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/obviousinhindsight.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/obviousinhindsight.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/obviousinhindsight.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/obviousinhindsight.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/obviousinhindsight.wordpress.com/145/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=145&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://obviousinhindsight.wordpress.com/2010/01/13/web-design-absolute-document-relative-and-root-relative-paths/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc79b627f2088723c84b4cfaa4d79867?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">obviousinhindsight</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP: Include file</title>
		<link>http://obviousinhindsight.wordpress.com/2010/01/11/php-include-file/</link>
		<comments>http://obviousinhindsight.wordpress.com/2010/01/11/php-include-file/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 21:35:15 +0000</pubDate>
		<dc:creator>obviousinhindsight</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[include]]></category>
		<category><![CDATA[include function]]></category>
		<category><![CDATA[output]]></category>
		<category><![CDATA[parsed code]]></category>
		<category><![CDATA[search engine]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://obviousinhindsight.wordpress.com/?p=135</guid>
		<description><![CDATA[The include function is useful for streamlining  code across your site. Rather than the full code of you header section, for example, you can replace it the one line of code required for the include function. This is also advantageous for future modifications. This does not affect SEO (Search Engine Optimization) since search engines only [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=135&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The include function is useful for streamlining  code across your site. Rather than the full code of you header section, for example, you can replace it the one line of code required for the include function. This is also advantageous for future modifications. This does not affect SEO (Search Engine Optimization) since search engines only detect the parsed code (output i.e. what you see in the source code).</p>
<blockquote><p>&lt;?php include(&#8220;somefolder/somedocument.html&#8221;); ?&gt;</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/obviousinhindsight.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/obviousinhindsight.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/obviousinhindsight.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/obviousinhindsight.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/obviousinhindsight.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/obviousinhindsight.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/obviousinhindsight.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/obviousinhindsight.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/obviousinhindsight.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/obviousinhindsight.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/obviousinhindsight.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/obviousinhindsight.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/obviousinhindsight.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/obviousinhindsight.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=135&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://obviousinhindsight.wordpress.com/2010/01/11/php-include-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc79b627f2088723c84b4cfaa4d79867?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">obviousinhindsight</media:title>
		</media:content>
	</item>
		<item>
		<title>Web Design: Meta tags</title>
		<link>http://obviousinhindsight.wordpress.com/2010/01/11/web-design-meta-tags/</link>
		<comments>http://obviousinhindsight.wordpress.com/2010/01/11/web-design-meta-tags/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 18:16:17 +0000</pubDate>
		<dc:creator>obviousinhindsight</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[author]]></category>
		<category><![CDATA[content-type]]></category>
		<category><![CDATA[description]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML 4.01]]></category>
		<category><![CDATA[keywords]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[meta data]]></category>
		<category><![CDATA[meta tags]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://obviousinhindsight.wordpress.com/?p=132</guid>
		<description><![CDATA[Meta tags contain metadata about a HTML document. Metadata is defined in the between the &#60;head&#62; elements and therefore will not by displayed on your page when it&#8217;s rendered in a browser. Metadata can be used to describe your page, keywords, author, the &#8216;last modified&#8217; date and more. Using meta tags &#60;head&#62; &#60;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=132&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Meta tags contain metadata about a HTML document. Metadata is defined in the between the &lt;head&gt; elements and therefore will not by displayed on your page when it&#8217;s rendered in a browser. Metadata can be used to describe your page, keywords, author, the &#8216;last modified&#8217; date and more.</p>
<h3>Using meta tags</h3>
<blockquote>
<div id="_mcePaste">&lt;head&gt;</div>
<p>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=utf-8&#8243;&gt;</p>
<p>&lt;meta name=&#8221;description&#8221; content=&#8221;Your site description goes here  e.g. web design or Chinese Kung Fu secrets. Bare in mind that is what search engines will display beneath the link to your site as a description&#8221;&gt;</p>
<p>&lt;meta name=&#8221;keywords&#8221; content=&#8221;Your keywords, go, here, and are, separated by commas, but, can be more, than, one, word if you, so, wish&#8221;&gt;</p>
<p>&lt;meta name=&#8221;author&#8221; content=&#8221;Your name goes here&#8221;&gt;</p>
<p>&lt;title&gt;Your website name goes here&lt;/title&gt;</p>
<p>&lt;/head&gt;</p></blockquote>
<h3>HTML vs. XHTML metadata</h3>
<p>In HTML, the meta tags <strong>should not be closed</strong> i.e. no forward slash before the closing bracket of the element:</p>
<blockquote><p>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=utf-8&#8243;&gt;</p></blockquote>
<p>In XHTML, the meta tags <strong>should be</strong> closed i.e. add a forward slash before the closing bracket of the element:</p>
<blockquote><p>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=utf-8&#8243; /&gt;</p></blockquote>
<p>Everything&#8217;s obvious in hindsight, eh?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/obviousinhindsight.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/obviousinhindsight.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/obviousinhindsight.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/obviousinhindsight.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/obviousinhindsight.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/obviousinhindsight.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/obviousinhindsight.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/obviousinhindsight.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/obviousinhindsight.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/obviousinhindsight.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/obviousinhindsight.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/obviousinhindsight.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/obviousinhindsight.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/obviousinhindsight.wordpress.com/132/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=132&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://obviousinhindsight.wordpress.com/2010/01/11/web-design-meta-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc79b627f2088723c84b4cfaa4d79867?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">obviousinhindsight</media:title>
		</media:content>
	</item>
		<item>
		<title>CSS: Horizontal row of images in a div</title>
		<link>http://obviousinhindsight.wordpress.com/2010/01/11/css-horizontal-row-of-images-in-a-div/</link>
		<comments>http://obviousinhindsight.wordpress.com/2010/01/11/css-horizontal-row-of-images-in-a-div/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 16:12:30 +0000</pubDate>
		<dc:creator>obviousinhindsight</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[blank space]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[browser bug]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[cascading style sheets]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[float]]></category>
		<category><![CDATA[horizontal]]></category>
		<category><![CDATA[horizontal images]]></category>
		<category><![CDATA[horizontal list]]></category>
		<category><![CDATA[horizontal row]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE6 bug]]></category>
		<category><![CDATA[IE6 float bug]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://obviousinhindsight.wordpress.com/?p=127</guid>
		<description><![CDATA[Often, images are arranged horizontally for the purposes of a navigation menu using images rather than standard text link. What in theory should be a relativly simple task can in practice become a nightmare if you overthink the process, are unaware of the idiosyncracities of the various popular browsers and the relevant workarounds. The simple [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=127&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Often, images are arranged horizontally for the purposes of a navigation menu using images rather than standard text link. What in theory should be a relativly simple task can in practice become a nightmare if you overthink the process, are unaware of the idiosyncracities of the various popular browsers and the relevant workarounds. The simple fact of the matter is you can do this without any CSS whatsoever.</p>
<h3>The correct way of arranging images inside a div</h3>
<p>Let&#8217;s say we have six images that we want to arrange in our div. The following HTML code will do just that:</p>
<blockquote><p>&lt;div&gt;</p>
<p>&lt;img src=&#8221;images/image1.png&#8221;&gt;&lt;img src=&#8221;images/image2.png&#8221;&gt;&lt;img src=&#8221;images/image3.png&#8221;&gt;img src=&#8221;images/image4.png&#8221;&gt;&lt;img src=&#8221;images/image5.png&#8221;&gt;&lt;img src=&#8221;images/image6.png&#8221;&gt;</p>
<p>&lt;/div&gt;</p></blockquote>
<p>It&#8217;s very important to note that there can not be a space or spaces between your image elements. If you do, most browsers will render an undesirable blank space between your images of about five to ten pixels in width. It took me a few hours of searching to find this solution. The following code, which has spaces between the image elements is an example of the incorrect way of going about this.</p>
<h3>What will not work</h3>
<blockquote><p>&lt;div&gt;</p>
<p>&lt;img src=&#8221;images/image1.png&#8221;&gt;</p>
<p>&lt;img src=&#8221;images/image2.png&#8221;&gt;</p>
<p>&lt;img src=&#8221;images/image3.png&#8221;&gt;</p>
<p>&lt;img src=&#8221;images/image4.png&#8221;&gt;</p>
<p>&lt;img src=&#8221;images/image5.png&#8221;&gt;</p>
<p>&lt;img src=&#8221;images/image6.png&#8221;&gt;</p>
<p>&lt;/div&gt;</p></blockquote>
<h3>Why not use a horizontal unordered list?</h3>
<p>You don&#8217;t need to unless your images are actually part of a list. You can, if you really feel the need but why add extraneous code?</p>
<h3>Why not use CSS?</h3>
<p>Again, you can but you don&#8217;t need to for the specific purpose of arranging the images. The most common way of going about this in CSS would involve styling an unordered list horizontally, the use of floats and various checks for cross-browser rendering. Furthermore, IE6 present various bugs with floats for novices. If you can do the exact same thing without CSS and with code then why bother?</p>
<h3>Conclusion</h3>
<p>Make sure there are no spaces between your image elements. Sure, the HTML markup will look cluttered but it&#8217;s the only workaround I&#8217;m aware of.</p>
<p>Everything&#8217;s obvious in hindsight, eh?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/obviousinhindsight.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/obviousinhindsight.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/obviousinhindsight.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/obviousinhindsight.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/obviousinhindsight.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/obviousinhindsight.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/obviousinhindsight.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/obviousinhindsight.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/obviousinhindsight.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/obviousinhindsight.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/obviousinhindsight.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/obviousinhindsight.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/obviousinhindsight.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/obviousinhindsight.wordpress.com/127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=127&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://obviousinhindsight.wordpress.com/2010/01/11/css-horizontal-row-of-images-in-a-div/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc79b627f2088723c84b4cfaa4d79867?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">obviousinhindsight</media:title>
		</media:content>
	</item>
		<item>
		<title>Web Design: Basic mouse-over image swap</title>
		<link>http://obviousinhindsight.wordpress.com/2010/01/11/web-design-basic-mouse-over-image-swap/</link>
		<comments>http://obviousinhindsight.wordpress.com/2010/01/11/web-design-basic-mouse-over-image-swap/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 03:08:50 +0000</pubDate>
		<dc:creator>obviousinhindsight</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[image swap]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mouseover image]]></category>
		<category><![CDATA[rollover button]]></category>
		<category><![CDATA[rollover image]]></category>

		<guid isPermaLink="false">http://obviousinhindsight.wordpress.com/?p=123</guid>
		<description><![CDATA[A common image effect is to swap out an image for another when the end-user places their mouse over it. This techniques is usually used for links but can be used as creatively as you like. Basic mouse-over image swap (JavaScript) You should have two images: a default image and an image that&#8217;s to appear on the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=123&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A common image effect is to swap out an image for another when the end-user places their mouse over it. This techniques is usually used for links but can be used as creatively as you like.</p>
<h3>Basic mouse-over image swap (JavaScript)</h3>
<p>You should have two images: a default image and an image that&#8217;s to appear on the mouse-over event.  &#8217;somename&#8217; is simply what we&#8217;ve named our image swap. This can be changed but must remain consistent for each the three counts e.g. &#8216;myimagswap1, myimagswap1 and myimagswap1&#8242; but not  &#8217;myimagswap1, myimagswap2 and myimagswap3&#8242;</p>
<blockquote>
<div id="_mcePaste">&lt;a href=&#8221;" onmouseover=&#8221;document.somename.src=&#8217;images/mouse-over-image.png&#8217;&#8221; onmouseout=&#8221;document.somename.src=&#8217;images/default-image.png&#8217;&#8221;&gt;</div>
<div id="_mcePaste">&lt;img src=&#8221;images/default-image.png&#8221; name=&#8221;somename&#8221;&gt;</div>
<div id="_mcePaste">&lt;/a&gt;</div>
</blockquote>
<div>Everything&#8217;s obvious in hindsight, eh?</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/obviousinhindsight.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/obviousinhindsight.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/obviousinhindsight.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/obviousinhindsight.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/obviousinhindsight.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/obviousinhindsight.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/obviousinhindsight.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/obviousinhindsight.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/obviousinhindsight.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/obviousinhindsight.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/obviousinhindsight.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/obviousinhindsight.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/obviousinhindsight.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/obviousinhindsight.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=123&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://obviousinhindsight.wordpress.com/2010/01/11/web-design-basic-mouse-over-image-swap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc79b627f2088723c84b4cfaa4d79867?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">obviousinhindsight</media:title>
		</media:content>
	</item>
		<item>
		<title>CSS: Horizontal ul (unordered list)</title>
		<link>http://obviousinhindsight.wordpress.com/2010/01/11/css-horizontal-ul-unordered-list/</link>
		<comments>http://obviousinhindsight.wordpress.com/2010/01/11/css-horizontal-ul-unordered-list/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 02:36:45 +0000</pubDate>
		<dc:creator>obviousinhindsight</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[bullet]]></category>
		<category><![CDATA[bullet indent]]></category>
		<category><![CDATA[cascading style sheets]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[horizontal list]]></category>
		<category><![CDATA[horizontal menu]]></category>
		<category><![CDATA[hover link]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[id]]></category>
		<category><![CDATA[li]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[list item]]></category>
		<category><![CDATA[list padding]]></category>
		<category><![CDATA[mouse over link]]></category>
		<category><![CDATA[navigation menu]]></category>
		<category><![CDATA[style sheet]]></category>
		<category><![CDATA[ul]]></category>
		<category><![CDATA[unordered list]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://obviousinhindsight.wordpress.com/?p=116</guid>
		<description><![CDATA[An unordered list is a list that uses bullet points rather than incrementing numbers (1, 2, 3, 4 etc.). By default a browser will render the list vertically. The following styling will remove the bullets, the default bullet indent (margin), the list padding and will arrange the list horizontally rather than vertically. This technique is commonly used [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=116&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>An unordered list is a list that uses bullet points rather than incrementing numbers (1, 2, 3, 4 etc.). By default a browser will render the list vertically. The following styling will remove the bullets, the default bullet indent (margin), the list padding and will arrange the list horizontally rather than vertically. This technique is commonly used for navigation menus.</p>
<h3>Styling an unordered list</h3>
<p>Firstly create your list in HTML and define a class (learn about classes <a href="http://obviousinhindsight.wordpress.com/2010/01/10/css-id-vs-class/">here</a>):</p>
<blockquote><p>&lt;div class=&#8221;navigation-menu&#8221;&gt;</p>
<p>&lt;ul&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;http://yoursite.com/index.html&#8221;&gt;Home&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;http://yoursite.com/link2.html&#8221;&gt;Link 2&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;http://yoursite.com/link3.html&#8221;&gt;Link 3&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;http://yoursite.com/link4.html&#8221;&gt;Link 4&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;http://yoursite.com/link5.html&#8221;&gt;Link 5&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;/ul&gt;</p>
</blockquote>
<p>Next, let&#8217;s begin adding the relevant code to your style sheet (learn about about the various ways of adding style to you HTML documents <a href="http://obviousinhindsight.wordpress.com/2010/01/10/css-id-vs-class/">here</a>):</p>
<blockquote><div id="_mcePaste">navigation-menu.ul{</div>
<div id="_mcePaste">list-style-type:none; /* This removes the bullets */</div>
<div id="_mcePaste">margin:0px; /* The removes the default bullet indent */</div>
<div id="_mcePaste">padding:0px; /* This removes the default list padding */</div>
<div id="_mcePaste">}</div>
<p>.navigation-menu li{</p>
<p>display:inline; /* This switches the list from vertical to horizontal */</p>
<p>}</p>
</blockquote>
<p>Next, let&#8217;s finish by styling the links with some basic effects (you can learn more about this <a href="http://obviousinhindsight.wordpress.com/2010/01/10/css-links/">here</a>).</p>
<blockquote><p>.navigation-menu a:link {</p>
<p>color:#000000;  /* This is the text color */</p>
<p>text-decoration:none; /* This removes the link underline */</p>
<p>padding:0em 2em 0em 0em;  /* This adds 2 characters worth of space to the right of each link */</p>
<p>}</p>
<p>.navigation-menu a:visited {</p>
<p>color:#000000;  /* This is the text color */</p>
<p>text-decoration:none; /* This removes the link underline */</p>
<p>padding:0em 2em 0em 0em;  /* This adds 2 characters worth of space to the right of each link */</p>
<p>}</p>
<p>.navigation-menu a:hover {</p>
<p>color:#FF0000;  /* This is the text color */</p>
<p>text-decoration:underline; /* This adds the link underline */</p>
<p>padding:0em 2em 0em 0em;  /* This adds 2 characters worth of space to the right of each link */</p>
<p>}</p>
<p>.navigation-menu a:active {</p>
<p>color:#000000;  /* This is the text color */</p>
<p>text-decoration:none; /* This removes the link underline */</p>
<p>padding:0em 2em 0em 0em;  /* This adds 2 characters worth of space to the right of each link */</p>
<p>}</p>
</blockquote>
<div>That&#8217;s basically it. You now have rudimentary horizontal list that functions as a navigation menu. You can use CSS to add background images for hover effects etc.</div>
<p>Everything&#8217;s obvious in hindsight, eh?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/obviousinhindsight.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/obviousinhindsight.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/obviousinhindsight.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/obviousinhindsight.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/obviousinhindsight.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/obviousinhindsight.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/obviousinhindsight.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/obviousinhindsight.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/obviousinhindsight.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/obviousinhindsight.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/obviousinhindsight.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/obviousinhindsight.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/obviousinhindsight.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/obviousinhindsight.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=116&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://obviousinhindsight.wordpress.com/2010/01/11/css-horizontal-ul-unordered-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc79b627f2088723c84b4cfaa4d79867?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">obviousinhindsight</media:title>
		</media:content>
	</item>
		<item>
		<title>CSS: Links</title>
		<link>http://obviousinhindsight.wordpress.com/2010/01/10/css-links/</link>
		<comments>http://obviousinhindsight.wordpress.com/2010/01/10/css-links/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 23:22:08 +0000</pubDate>
		<dc:creator>obviousinhindsight</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[active link]]></category>
		<category><![CDATA[cascading style sheets]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[hover link]]></category>
		<category><![CDATA[id]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[link style]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[mouse over link]]></category>
		<category><![CDATA[selected link]]></category>
		<category><![CDATA[visited link]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://obviousinhindsight.wordpress.com/?p=112</guid>
		<description><![CDATA[Links can styled by ID or class (an ID can only called on once whereas a class can be called on many times). The styling is generally used to present a sense of interactivity to the end-user. Links have four states: link (unvisited) visited hover (mouse over) active (selected) The unvisited and visited links are self-explanatory. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=112&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Links can styled by ID or class (an ID can only called on once whereas a class can be called on many times). The styling is generally used to present a sense of interactivity to the end-user. Links have four states:</p>
<ul>
<li>link (unvisited)</li>
<li>visited</li>
<li>hover (mouse over)</li>
<li>active (selected)</li>
</ul>
<p>The unvisited and visited links are self-explanatory. The hover link is how the link appears when the mouse cursor is placed over it.</p>
<h3>Active links vs visited links</h3>
<p>Active links are links that have <em>just</em> been clicked. It&#8217;s fairly redundant considering that the target us usually loaded as soon as the linked is clicked so you may not get to see it&#8217;s styling for the active state. Furthermore, when the visitor returns to your site the active link will become a visited link so again, you won&#8217;t get to see it&#8217;s styling.</p>
<h3>Styling links using a class</h3>
<blockquote><p>a.somenav:link {color: red; text-decoration:none;} /* unvisited link */</p>
<p>a.somenav:visited {color: purple; text-decoration:none;} /* visited link */</p>
<p>a.somenav:hover {color: red; text-decoration:underline;} /* mouse over link */</p>
<p>a.somenav:active {color: blue; text-decoration:underline;} /* selected link */</p></blockquote>
<h3>Styling links using an ID</h3>
<blockquote>
<div id="_mcePaste">#somenav a:link {color: purple; text-decoration:none;} /* unvisited link */</div>
<div id="_mcePaste">#somenav a:visited {color: purple; text-decoration:none;} /* visited link */</div>
<div id="_mcePaste">#somenav a:hover {color: red; text-decoration:underline;} /* mouse over link */</div>
<div id="_mcePaste">#somenave a:active {color: blue; text-decoration:underline;} /* selected link */</div>
</blockquote>
<div>Everything&#8217;s obvious in hindsight, eh?</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/obviousinhindsight.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/obviousinhindsight.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/obviousinhindsight.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/obviousinhindsight.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/obviousinhindsight.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/obviousinhindsight.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/obviousinhindsight.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/obviousinhindsight.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/obviousinhindsight.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/obviousinhindsight.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/obviousinhindsight.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/obviousinhindsight.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/obviousinhindsight.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/obviousinhindsight.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=112&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://obviousinhindsight.wordpress.com/2010/01/10/css-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc79b627f2088723c84b4cfaa4d79867?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">obviousinhindsight</media:title>
		</media:content>
	</item>
		<item>
		<title>CSS: ID vs. Class</title>
		<link>http://obviousinhindsight.wordpress.com/2010/01/10/css-id-vs-class/</link>
		<comments>http://obviousinhindsight.wordpress.com/2010/01/10/css-id-vs-class/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 22:50:21 +0000</pubDate>
		<dc:creator>obviousinhindsight</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[cascading style sheets]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[id]]></category>
		<category><![CDATA[ID vs. class]]></category>
		<category><![CDATA[style sheets]]></category>
		<category><![CDATA[sub-element]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://obviousinhindsight.wordpress.com/?p=107</guid>
		<description><![CDATA[IDs and classes are used as part of a HTML element to trigger (call on)  the styling in your CSS documents. What&#8217;s the difference? An ID can only be called on once and is used for a unique element of your web page such as a banner, navigation menu or footer. The following example demonstrates [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=107&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>IDs and classes are used as part of a HTML element to trigger (call on)  the styling in your CSS documents.</p>
<h3>What&#8217;s the difference?</h3>
<p>An ID can only be called on once and is used for a unique element of your web page such as a banner, navigation menu or footer. The following example demonstrates how a div is defined using an ID (#).</p>
<blockquote><p>div#header { background-color: black; }</p></blockquote>
<p>Similarily, sub-elements of the above div can be defined as follows (notice that the sub-element is placed after the id name &#8211; this paragraph element does not need to have an id defined in html as your style sheet will automatically trigger it):</p>
<blockquote><p>#header p {color:#F00;}</p></blockquote>
<p>A class, as the name implies, can be called on more than once and can therefore used more than once on elements such as paragraphs, headers or links. The following example demonstrates how a paragraph is defined using an class (.).</p>
<blockquote><p><span>div.content-box</span>{ width:300px;  }</p></blockquote>
<p>Similarily, sub-elements of the above div can be defined as follows (again, notice that the sub-element is placed after the class name &#8211; this paragraph element does not need to have a class defined in html as your style sheet will automatically trigger it):</p>
<blockquote><p>.content-box p{color:#900;}</p></blockquote>
<h3>The benefit of styling sub-elements</h3>
<p>Simply put, by not having to define <strong>class=&#8221;somename&#8221;</strong> or <strong>id=&#8221;somename&#8221;</strong> in your elements you are minimizing the amount of code in your overall HTML document. The less clutter the better.</p>
<p>Everything&#8217;s obvious in hindsight, eh?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/obviousinhindsight.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/obviousinhindsight.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/obviousinhindsight.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/obviousinhindsight.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/obviousinhindsight.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/obviousinhindsight.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/obviousinhindsight.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/obviousinhindsight.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/obviousinhindsight.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/obviousinhindsight.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/obviousinhindsight.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/obviousinhindsight.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/obviousinhindsight.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/obviousinhindsight.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=107&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://obviousinhindsight.wordpress.com/2010/01/10/css-id-vs-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc79b627f2088723c84b4cfaa4d79867?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">obviousinhindsight</media:title>
		</media:content>
	</item>
		<item>
		<title>CSS: Inline, Internal, External</title>
		<link>http://obviousinhindsight.wordpress.com/2010/01/10/web-design-css-inline-internal-external/</link>
		<comments>http://obviousinhindsight.wordpress.com/2010/01/10/web-design-css-inline-internal-external/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 20:03:57 +0000</pubDate>
		<dc:creator>obviousinhindsight</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[attach style sheet]]></category>
		<category><![CDATA[attach stylesheet]]></category>
		<category><![CDATA[cascading style sheets]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[external CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[id]]></category>
		<category><![CDATA[inline CSS]]></category>
		<category><![CDATA[internal CSS]]></category>
		<category><![CDATA[selector]]></category>
		<category><![CDATA[style sheets]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://obviousinhindsight.wordpress.com/?p=98</guid>
		<description><![CDATA[You can add CSS (Cascading Style Sheets) to web pages in three different ways. External CSS is considered best practice since you can effectivly change the styling of an entire website by editing one CSS document. The inline and internal options would require you to edit each document individually which might prove to be unnecessary repetition. Inline [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=98&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You can add CSS (Cascading Style Sheets) to web pages in three different ways. External CSS is considered best practice since you can effectivly change the styling of an entire website by editing one CSS document. The inline and internal options would require you to edit each document individually which might prove to be unnecessary repetition.</p>
<h3>Inline CSS</h3>
<p>Inline CSS allows you to style the document from within the element.</p>
<blockquote><p>&lt;p <span style="color:#ff0000;">style=&#8221;background: black; color: white;&#8221;</span>&gt;</p>
<p>Some text here.</p>
<p>&lt;/p&gt;</p></blockquote>
<h3>Internal CSS</h3>
<p>Internal CSS is defined with in the &lt;head&gt; elements and is triggered by an element or by the specific selector of element (div or class).</p>
<blockquote><p>&lt;html&gt;</p>
<p>&lt;head&gt;</p>
<p><span style="color:#ff0000;">&lt;style type=&#8221;text/css&#8221;&gt;</span></p>
<p><span style="color:#ff0000;"> p {color: white; } </span></p>
<p><span style="color:#ff0000;"> body {background-color: black; }</span></p>
<p><span style="color:#ff0000;">&lt;/style&gt;</span></p>
<p>&lt;/head&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;p&gt;</p>
<p>Some text here.</p>
<p>&lt;/p&gt;</p>
<p>&lt;/body&gt;</p>
<p>&lt;/html&gt;</p></blockquote>
<h3>External CSS</h3>
<p>External CSS is defined a separate external document (e.g. mycsspage.css) and like internal CSS, is triggered by an element or by the specific selector of element (div or class). The following example shows the code as it might appear in your CSS document:</p>
<blockquote><p><span style="color:#ff0000;">body{ background-color: black;}</span></p>
<p><span style="color:#ff0000;">p { color: white; }</span></p>
<p><span style="color:#ff0000;">h3{ color: orange; }</span></p></blockquote>
<p>The following example shows the corresponding HTML:</p>
<blockquote><p>&lt;html&gt;</p>
<p>&lt;head&gt;</p>
<p><span style="color:red;"> &lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; href=&#8221;mycsspage.css&#8221; /&gt;</span></p>
<p>&lt;/head&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;h3&gt;</p>
<p>A White Header</p>
<p>&lt;/h3&gt;</p>
<p>&lt;p&gt;</p>
<p>Some text here.</p>
<p>&lt;/p&gt;</p>
<p>&lt;/body&gt;</p>
<p>&lt;/html&gt;</p></blockquote>
<p>It&#8217;s important that you link your HTML (or XHTML) document to your CSS document between the &lt;head&gt; elements.</p>
<h3>Using multiple style sheets</h3>
<p>You&#8217;re not limited to using the one style sheet. You can freely use as many as need to. I like to use multiple style sheets to avoid having to sift through cluttered code. I usually have the one universal style sheet and other just for forms or specific subsections of my site (e.g. blog or forum).</p>
<blockquote><p><span style="color:#888888;">&lt;head&gt;</span></p>
<p><span style="color:#000000;"><span style="color:#888888;"> &lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; href=</span><span style="color:#888888;">&#8220;</span><span style="color:#ff0000;">universal-styling.cs<span style="color:#ff0000;">s</span></span><span style="color:#888888;">&#8221; /&gt;</span></span></p>
<p><span style="color:#000000;"><span style="color:#888888;">&lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; href=&#8221;</span><span style="color:#ff0000;">styling-for-my-forms.css</span><span style="color:#888888;">&#8221; /&gt;</span></span></p>
<p><span style="color:#000000;"><span style="color:#888888;">&lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; href=&#8221;</span><span style="color:#ff0000;">styling-for-my-guestbook.css</span><span style="color:#888888;">&#8221; /&gt;</span></span></p>
<p><span style="color:#888888;">&lt;/head&gt;</span></p></blockquote>
<p>Everything&#8217;s obvious in hindsight, eh?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/obviousinhindsight.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/obviousinhindsight.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/obviousinhindsight.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/obviousinhindsight.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/obviousinhindsight.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/obviousinhindsight.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/obviousinhindsight.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/obviousinhindsight.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/obviousinhindsight.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/obviousinhindsight.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/obviousinhindsight.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/obviousinhindsight.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/obviousinhindsight.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/obviousinhindsight.wordpress.com/98/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=obviousinhindsight.wordpress.com&amp;blog=11269022&amp;post=98&amp;subd=obviousinhindsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://obviousinhindsight.wordpress.com/2010/01/10/web-design-css-inline-internal-external/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc79b627f2088723c84b4cfaa4d79867?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">obviousinhindsight</media:title>
		</media:content>
	</item>
	</channel>
</rss>
