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

<channel>
	<title>Design is Philosophy - The Pink &#38;amp Yellow Media Blog &#187; Tutorials</title>
	<atom:link href="http://www.designisphilosophy.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.designisphilosophy.com</link>
	<description>Tutorials and thoughts on Microsoft Expression, CSS and WordPress</description>
	<lastBuildDate>Sat, 20 Mar 2010 21:28:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom:link rel='hub' href='http://www.designisphilosophy.com/?pushpress=hub'/>
		<item>
		<title>HTML Basics: Hyperlink Syntax &#8211; Absolute, Relative and Root-relative</title>
		<link>http://www.designisphilosophy.com/tutorials/html-basics-hyperlink-syntax-absolute-relative-and-root-relative-20090824/</link>
		<comments>http://www.designisphilosophy.com/tutorials/html-basics-hyperlink-syntax-absolute-relative-and-root-relative-20090824/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 17:12:34 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[My Book]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=577</guid>
		<description><![CDATA[My new book Sams Teach Yourself Microsoft Expression Web 3 in 24 Hours is nearing completion (just finished final review of the first 10 chapters last night). The book is a revision of the original for the new version of Expression Web and in the rewriting process I also added some new content to help [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/microsoft-expression-web/expression-web-3-service-pack-1-now-available-20091120/' rel='bookmark' title='Permanent Link: Expression Web 3 Service Pack 1 now available'>Expression Web 3 Service Pack 1 now available</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression-web/previewing-silverlight-applications-in-your-browser-with-expression-development-server-20080803/' rel='bookmark' title='Permanent Link: Previewing Silverlight Applications in Your Browser With Expression Development Server'>Previewing Silverlight Applications in Your Browser With Expression Development Server</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression/expression-web-what-a-bug-already-20070626/' rel='bookmark' title='Permanent Link: Expression Web &#8211; What? A Bug Already?'>Expression Web &#8211; What? A Bug Already?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>My new book <a title="Learn Microsoft Expression Web 3 with this great book" href="http://bit.ly/3MpKBB" target="_blank">Sams Teach Yourself Microsoft Expression Web 3 in 24 Hours</a> is nearing completion (just finished final review of the first 10 chapters last night). The book is a revision of the original for the new version of Expression Web and in the rewriting process I also added some new content to help the readers better understand the sometimes confusing and mysterious world of web code. These additions were mostly brought forth by questions and comments from readers as is the case with the excerpt below about hyperlink syntax.</p>
<p>I chose this excerpt because it is relevant not only to people who use Expression Web 3 but to anyone who does anything on the web. When I started out in this field I was often confused about why there were three different types of hyperlinks and how and when to use them. Well, here is a straight forward explanation with examples:</p>
<h3>Absolute, Relative and Root-relative Hyperlinks &#8211; an explanation</h3>
<p>As you are creating hyperlinks in Expression Web 3, you will notice that the syntax of the link address in the Code view changes depending on what you link to. There are actually three different ways of writing a hyperlink address, all of which are used for different purposes:</p>
<h4>Absolute Hyperlinks</h4>
<p>Absolute hyperlinks are complete addresses that contain all the elements of a URL. They always start with some version of http:// followed by the domain name (for example, www.designisphilosophy.com) and optionally a page/folder. Absolute hyperlinks are used when linking to pages outside of the current site that have a different domain name.</p>
<h4>Relative Hyperlinks</h4>
<p>Relative hyperlinks are addresses that are relative to the current domain or location. They only contain the name of the target page prefixed with any necessary folder moves (for example, default.html). The browser sees that this is a relative hyperlink and adds the domain and folder location of the current page to the beginning of the link to complete it. If you use relative hyperlinks and you want to navigate from a page stored in one folder to a page stored in a different folder you add the folder prefixes to the hyperlink. For instance, a relative link from a page in Folder 1 to a page in Folder 2 would be ../Folder 2/page.html, where the ../ tells the browser you want to go out of the current folder and into a new one. When you create hyperlinks between pages in Expression Web 3, they are always inserted as relative links so that the application can easily update them if you choose to move files around. However, if you move the files around on your computer outside of the Expression Web program, the hyperlinks break.</p>
<h4>Root-relative Hyperlinks</h4>
<p>Root-relative hyperlinks are a subset of relative hyperlinks in which all the links are assumed to start from the root folder (domain name) of the site. They differ from the relative hyperlinks in that the address is prefixed by a forward slash (for example, /default.html). The browser applies only the domain to the beginning of this link. Root-relative hyperlinks are used in place of relative ones in large sites in which there is a chance the files will be moved around without using an application such as Expression Web 3 to update them. Because they refer to the root of the site rather than the current location of the page they are placed in, they work regardless of where the file is placed as long as they remain under the right domain.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=HTML+Basics%3A+Hyperlink+Syntax+-+Absolute%2C+Relative+and+Root-relative+-+http://www.designisphilosophy.com/tutorials/html-basics-hyperlink-syntax-absolute-relative-and-root-relative-20090824/+" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.designisphilosophy.com/tutorials/html-basics-hyperlink-syntax-absolute-relative-and-root-relative-20090824/&amp;t=HTML+Basics%3A+Hyperlink+Syntax+-+Absolute%2C+Relative+and+Root-relative" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22HTML%20Basics%3A%20Hyperlink%20Syntax%20-%20Absolute%2C%20Relative%20and%20Root-relative%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22My%20new%20book%20Sams%20Teach%20Yourself%20Microsoft%20Expression%20Web%203%20in%2024%20Hours%20is%20nearing%20completion%20%28just%20finished%20final%20review%20of%20the%20first%2010%20chapters%20last%20night%29.%20The%20book%20is%20a%20revision%20of%20the%20original%20for%20the%20new%20version%20of%20Expression%20Web%20and%20in%20the%20rewriting%20process%20I%20also%20added%20some%20new%20content%20to%20he%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://www.designisphilosophy.com/tutorials/html-basics-hyperlink-syntax-absolute-relative-and-root-relative-20090824/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.designisphilosophy.com/tutorials/html-basics-hyperlink-syntax-absolute-relative-and-root-relative-20090824/&amp;title=HTML+Basics%3A+Hyperlink+Syntax+-+Absolute%2C+Relative+and+Root-relative" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://www.designisphilosophy.com/tutorials/html-basics-hyperlink-syntax-absolute-relative-and-root-relative-20090824/&amp;title=HTML+Basics%3A+Hyperlink+Syntax+-+Absolute%2C+Relative+and+Root-relative" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.designisphilosophy.com/tutorials/html-basics-hyperlink-syntax-absolute-relative-and-root-relative-20090824/&amp;title=HTML+Basics%3A+Hyperlink+Syntax+-+Absolute%2C+Relative+and+Root-relative" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.designisphilosophy.com/tutorials/html-basics-hyperlink-syntax-absolute-relative-and-root-relative-20090824/&amp;title=HTML+Basics%3A+Hyperlink+Syntax+-+Absolute%2C+Relative+and+Root-relative" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-newsvine">
			<a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.designisphilosophy.com/tutorials/html-basics-hyperlink-syntax-absolute-relative-and-root-relative-20090824/&amp;h=HTML+Basics%3A+Hyperlink+Syntax+-+Absolute%2C+Relative+and+Root-relative" rel="nofollow" class="external" title="Seed this on Newsvine">Seed this on Newsvine</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->



<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/microsoft-expression-web/expression-web-3-service-pack-1-now-available-20091120/' rel='bookmark' title='Permanent Link: Expression Web 3 Service Pack 1 now available'>Expression Web 3 Service Pack 1 now available</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression-web/previewing-silverlight-applications-in-your-browser-with-expression-development-server-20080803/' rel='bookmark' title='Permanent Link: Previewing Silverlight Applications in Your Browser With Expression Development Server'>Previewing Silverlight Applications in Your Browser With Expression Development Server</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression/expression-web-what-a-bug-already-20070626/' rel='bookmark' title='Permanent Link: Expression Web &#8211; What? A Bug Already?'>Expression Web &#8211; What? A Bug Already?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/tutorials/html-basics-hyperlink-syntax-absolute-relative-and-root-relative-20090824/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why a CSS Reset should be at the core of your stylesheet</title>
		<link>http://www.designisphilosophy.com/css/why-a-css-reset-should-be-at-the-core-of-your-stylesheet-20090817/</link>
		<comments>http://www.designisphilosophy.com/css/why-a-css-reset-should-be-at-the-core-of-your-stylesheet-20090817/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 23:30:20 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=567</guid>
		<description><![CDATA[The CSS Reset is a little known and often overlooked tool in web design that makes cross-browser and cross-platform compatibility a lot easier. It also ensures that you start with a clean sheet when building CSS-based web sites, whether they be single pages, static sites, WordPress sites or anything else. In my view the CSS [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/microsoft-expression-web/center-a-page-horizontally-using-css-an-expansion-20080322/' rel='bookmark' title='Permanent Link: Center a Page Horizontally Using CSS &#8211; An Expansion'>Center a Page Horizontally Using CSS &#8211; An Expansion</a></li>
<li><a href='http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/' rel='bookmark' title='Permanent Link: Highlight current page in WordPress menus'>Highlight current page in WordPress menus</a></li>
<li><a href='http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/' rel='bookmark' title='Permanent Link: Create a Twitter box in your sidebar'>Create a Twitter box in your sidebar</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-570" title="CSS Reset" src="http://www.designisphilosophy.com/wp-content/uploads/2009/08/cssreset.jpg" alt="CSS Reset" width="506" height="246" />The <a title="Eric A. Meyer's CSS Reset Reloaded" href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/" target="_blank">CSS Reset</a> is a little known and often overlooked tool in web design that makes cross-browser and cross-platform compatibility a lot easier. It also ensures that you start with a clean sheet when building CSS-based web sites, whether they be single pages, static sites, WordPress sites or anything else. In my view the CSS reset is so important that web designers, even those just starting out, should use it at all times and make it the foundation of any and all style sheets they create. In fact the employment of the CSS Reset is a main tenant in both my books on Expression Web 2 and Expression Web 3 and is the basis of all my own design projects including the <a title="Free WordPress theme Typograph" href="http://wordpress.org/extend/themes/typograph" target="_blank">free WordPress theme Typograph</a>.</p>
<h3>Why do I need a CSS Reset?</h3>
<p>If you&#8217;ve never worked with a CSS Reset before I can pretty much guarantee that the question you are itching to ask is &#8220;why do I need a CSS Reset&#8221;. After all, you&#8217;ve designed or worked with numerous CSS-based sites in the past and even though they didn&#8217;t have a CSS Reset they work just fine. Right? Well, let me ask you this: If you&#8217;ve ever tried to design a site from scratch using CSS, and you&#8217;ve tried to make it cross-browser compatible, you&#8217;ve probably noticed that your styles don&#8217;t always look the same in different browsers even though they should. In most cases this has been a Internet Explorer vs. the rest type of battle and you&#8217;ve probably written it off as such and just picked a side. But that&#8217;s not the only, or right for that matter, solution. If you run into a browser incompatibility issue where CSS is concerned, it&#8217;s more often than not due to the fact you haven&#8217;t properly defined your styles leaving it up to the respective browser to make guesses as to what you want the site to look like.</p>
<p>To put it in simpler terms: If you don&#8217;t define all the default CSS parameters in your style sheet, the browser will use its default parameters instead. And since different browsers have different parameters your site will end up looking different depending on what browser you use.</p>
<h3>What does the CSS Reset do?</h3>
<p>As the name suggests, the CSS Reset resets all the default CSS parameters to a neutral position thus overriding any predefined assumptions at the hands of the browser. That&#8217;s a bit of a vague explanation so I&#8217;ve made a visual example that illustrates it perfectly:</p>
<p><img class="aligncenter size-full wp-image-568" title="CSS Reset example" src="http://www.designisphilosophy.com/wp-content/uploads/2009/08/css-reset-example.jpg" alt="CSS Reset example" width="506" height="556" /></p>
<p>The image above shows the same piece of basic HTML displayed when no CSS is defined and when the CSS Reset is applied. It is pretty obvious what happens: When you create a HTML page with some basic tags like &lt;h1&gt;, &lt;p&gt;, &lt;blockquote&gt; and &lt;ul&gt; without defining the styles of these tags with CSS, the browser applies its default stylesheet to these tags. But like I said earlier, different browsers have different standard stylesheets and as a result the page won&#8217;t look the same across all browser. And although this isn&#8217;t really a big problem when we&#8217;re talking super-basic stuff like what is displayed above, it becomes a serious pain in the neck when you create complicated CSS layouts.</p>
<h3>So all I&#8217;m doing is creating more work for myself?</h3>
<p>Unfortunately the gut reaction from a lot of people when they see the image above is &#8220;Oh crap! Why would I ever do that? I just create tons of work for myself.&#8221; Well, that&#8217;s partly true: With a CSS Reset applied you do have to manually define all your styles unless you like the reset look (I don&#8217;t). But on the bright side that also means you are now in complete control of every aspect of your site and nothing is left to chance any more. And in my book the former far outweighs the latter.</p>
<p>If that doesn&#8217;t convince you, consider this: Before I startet using the CSS Reset in all my projects, I spent a lot of time trying to jury rig my code into playing nice in all browsers. This often included using IE hacks and JavaScript. After emplying the CSS Reset I only rarely encounter these problems, and when I do it&#8217;s usually because I made a mistake somewhere.</p>
<h3>Alright, I&#8217;m sold. How do I start using the CSS Reset?</h3>
<p>There are several CSS Resets available out there. The one I use is CSS guru Eric A. Meyer&#8217;s <a title="Eric A. Meyer's CSS Reset Reloaded" href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/" target="_blank">Reset Reloaded</a>. It seems to be the most comprehensive reset and it is constantly being updated. To employ it I simply copy the code from the site and paste it in at the very top of my stylesheet. When it comes time to work on my own styles I make new ones leaving the CSS Reset intact. Cascading Style Sheets work as a cascade from the top down which means with the CSS Reset on top the browser will first read all the reset styles and then whatever styles I define below and apply them in order. That way the layout is guaranteed to be clean of browser junk and only shows my style code.</p>
<p>That really is all there is to it. So employ the CSS Reset and go forth and code.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Why+a+CSS+Reset+should+be+at+the+core+of+your+stylesheet+-+http://www.designisphilosophy.com/css/why-a-css-reset-should-be-at-the-core-of-your-stylesheet-20090817/+" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.designisphilosophy.com/css/why-a-css-reset-should-be-at-the-core-of-your-stylesheet-20090817/&amp;t=Why+a+CSS+Reset+should+be+at+the+core+of+your+stylesheet" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Why%20a%20CSS%20Reset%20should%20be%20at%20the%20core%20of%20your%20stylesheet%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22The%20CSS%20Reset%20is%20a%20little%20known%20and%20often%20overlooked%20tool%20in%20web%20design%20that%20makes%20cross-browser%20and%20cross-platform%20compatibility%20a%20lot%20easier.%20It%20also%20ensures%20that%20you%20start%20with%20a%20clean%20sheet%20when%20building%20CSS-based%20web%20sites%2C%20whether%20they%20be%20single%20pages%2C%20static%20sites%2C%20WordPress%20sites%20or%20anything%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://www.designisphilosophy.com/css/why-a-css-reset-should-be-at-the-core-of-your-stylesheet-20090817/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.designisphilosophy.com/css/why-a-css-reset-should-be-at-the-core-of-your-stylesheet-20090817/&amp;title=Why+a+CSS+Reset+should+be+at+the+core+of+your+stylesheet" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://www.designisphilosophy.com/css/why-a-css-reset-should-be-at-the-core-of-your-stylesheet-20090817/&amp;title=Why+a+CSS+Reset+should+be+at+the+core+of+your+stylesheet" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.designisphilosophy.com/css/why-a-css-reset-should-be-at-the-core-of-your-stylesheet-20090817/&amp;title=Why+a+CSS+Reset+should+be+at+the+core+of+your+stylesheet" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.designisphilosophy.com/css/why-a-css-reset-should-be-at-the-core-of-your-stylesheet-20090817/&amp;title=Why+a+CSS+Reset+should+be+at+the+core+of+your+stylesheet" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-newsvine">
			<a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.designisphilosophy.com/css/why-a-css-reset-should-be-at-the-core-of-your-stylesheet-20090817/&amp;h=Why+a+CSS+Reset+should+be+at+the+core+of+your+stylesheet" rel="nofollow" class="external" title="Seed this on Newsvine">Seed this on Newsvine</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->



<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/microsoft-expression-web/center-a-page-horizontally-using-css-an-expansion-20080322/' rel='bookmark' title='Permanent Link: Center a Page Horizontally Using CSS &#8211; An Expansion'>Center a Page Horizontally Using CSS &#8211; An Expansion</a></li>
<li><a href='http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/' rel='bookmark' title='Permanent Link: Highlight current page in WordPress menus'>Highlight current page in WordPress menus</a></li>
<li><a href='http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/' rel='bookmark' title='Permanent Link: Create a Twitter box in your sidebar'>Create a Twitter box in your sidebar</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/css/why-a-css-reset-should-be-at-the-core-of-your-stylesheet-20090817/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation</title>
		<link>http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/</link>
		<comments>http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 15:30:48 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Video Tutorials]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[WordPress as CMS]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[expression]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[template_tags]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordcamp]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=354</guid>
		<description><![CDATA[
Finally, after a full week of catching up, here is the video tutorial version of my presentation at WordCamp Whistler 09 for those who were there and those who couldn&#8217;t come. The video is also available on WordPress.tv if you&#8217;d rather watch it there. I recorded the video over the weekend and it contains the [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/' rel='bookmark' title='Permanent Link: Code snippets from my WordCamp presentation'>Code snippets from my WordCamp presentation</a></li>
<li><a href='http://www.designisphilosophy.com/news/wordcamp-whistler-wordpress-as-cms-20081219/' rel='bookmark' title='Permanent Link: WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS'>WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS</a></li>
<li><a href='http://www.designisphilosophy.com/events/speaking-about-wordpress-as-cms-at-wordcamp-whistler-what-do-you-want-me-to-cover-20090112/' rel='bookmark' title='Permanent Link: Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?'>Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><object width="516" height="392" data="http://vimeo.com/moogaloop.swf?clip_id=3061704&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=3061704&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /></object><br />
Finally, after a full week of catching up, here is the video tutorial version of my presentation at WordCamp Whistler 09 for those who were there and those who couldn&#8217;t come. The video is also available on <a title="Watch the video at WordPress.tv" href="http://wordpress.tv/2009/02/04/wordcamp-whislter-2009-using-wordpress-in-alternate-configurations/" target="_blank">WordPress.tv</a> if you&#8217;d rather watch it there. I recorded the video over the weekend and it contains the entire presentation including all my fancy slides as well as the code examples and demos. The only thing you won&#8217;t see is me waving my hands around and messing up the code like I did at the actual event ;o)</p>
<h3>Code Snippets</h3>
<p>The last half of the presentation centers around creating Custom Page Templates and Custom Fields for layout purposes. To help you along in your own WordPress site development, here are those code snippets ready to be cut and pasted into your templates:</p>
<h4>Custom Page Templates in 5 lines of code</h4>
<p>This block of code is inserted at the very top of the Custom Page Template file.  To get started, simply open the page.php file, save it under a different name, paste these 5 lines of code at the top of the document, save and upload to your server. To activate the new Custom Page Template just select it from the Template menu under Attributes in the Page Editor within WordPress.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php <span style="color: #66cc66;">/</span>*</span>
<span style="color: #009900;">Template <span style="color: #000066;">Name</span>: Whatever </span>
<span style="color: #009900;">*<span style="color: #66cc66;">/</span> ?&gt;</span></pre></div></div>

<h4>Custom Fields in one line of code</h4>
<p>This code can be used in any template file including but not limited to page.php, any Custom Page Templates, index.php, archives.php, single.php etc etc. The code returns a string of text that matches the text inserted in the custom field. Remember to replace $key with the actual name of the custom field. <a title="Custom Fields in the WordPress Codex" href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">You can read more about Custom Fields and how to use them in the WordPress Codex</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"> <span style="color: #009900;">&lt;?php echo get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, '$key', true); ?&gt;</pre></div></div>

<h4>Custom Field that parses PHP code</h4>
<p>This code is used to parse (interpret) PHP code inserted into custom fields. It is a bit wonky &#8211; for instance it terminates any other custom field code placed directly after it in a page &#8211; so use it with caution. Otherwise it works exactly as the code above.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php $boxContent <span style="color: #66cc66;">=</span> get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, 'centerBox', true); ?&gt; 
<span style="color: #009900;">&lt;?php eval<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'?'</span>.<span style="color: #ff0000;">'&gt;</span></span>'.$boxContent); ?&gt;</pre></div></div>

<h3>Applications Used in the Presentation</h3>
<p>After the presentation several people came up to me and asked what applications I used, so here is a short list:</p>
<h4>BitNami WordPress Stack</h4>
<p>The demo site I used in the presentation was actually installed and running locally within Windows 7. To achieve this I used an ingenious application named <a title="Download the BitNami WordPress Stack" href="http://bitnami.org/stack/wordpress" target="_blank">BitNami WordPress Stack</a>. Once installed this application will run a fully functional version of WordPress with database entry, plug-ins, custom themes and everything else you want to throw at it right inside Windows (XP, Vista and Windows 7 supported) so you don&#8217;t have to keep uploading your files to a server or hassle through complicated XAMP installs to play around with WordPress while offline. You can even install several different WordPress and other open source CMS stacks on your computer simultaneously to further increase your productivity. I have no idea exactly how it works but BitNami works incredibly well. Just remember to set the IP address to &#8220;localhost&#8221; when you install it.<br />
You can download the BitNami WordPress Stack here. For Mac users there is a similar application called <a title="MAMP" href="http://www.mamp.info/en/index.php" target="_blank">MAMP</a> but I know nothing about it.</p>
<h4>Web Developer Add-On for FireFox</h4>
<p>FireFox is my absolute favourite browser and I use it for browsing as well as in the design process. One of the main advantages of FireFox is the myriad of add-ons you can install that make web site development a lot easier. The one I use the most is the <a title="Download the Web Developer add-on for FireFox" href="https://addons.mozilla.org/en-US/firefox/addon/60" target="_blank">Web Developer Add-On</a>. This small application within an application lets you see and mess with CSS, turn styles and JavaScript on and off and do tons of other stuff that makes it easier to dissect and troubleshoot buggy web pages. Combine it with the <a title="Download the HTML Validator add-on for FireFox" href="https://addons.mozilla.org/en-US/firefox/addon/249" target="_blank">HTML Validator add-on</a> and you have a true powerhouse in a small browser window.</p>
<h4>Microsoft Expression Web 2</h4>
<p>My web development platform of choice is Microsoft Expression Web 2. This new offering from Microsoft is what enables me to build custom WordPress themes and web sites like <a title="Hire Anny Chih for the Best Job in the World" href="http://www.annychih.com" target="_blank">AnnyChih.com</a> from scratch in less than 24 hours. There are many great things you can talk about with Expression Web 2 but for WordPress theme development the two main features is full PHP support, unrivaled CSS integration and Standards Based CSS generation right out of the box. If you want to know more about Expression Web 2 or want to learn how to use it you can read more on this blog or pick up a copy of my book <a title="Teach Yourself Microsoft Expression Web" href="http://tinyurl.com/styexpressionweb2" target="_blank">Sams Teach Yourself Microsoft Expression Web 2 in 24 Hours</a>. It&#8217;s a good read, I promise.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Using+WordPress+in+Alternate+Configurations+-+My+WordCamp+Whistler+09+Presentati%5B..%5D+-+http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/+" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/&amp;t=Using+WordPress+in+Alternate+Configurations+-+My+WordCamp+Whistler+09+Presentation" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Using%20WordPress%20in%20Alternate%20Configurations%20-%20My%20WordCamp%20Whistler%2009%20Presentation%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22%0D%0AFinally%2C%20after%20a%20full%20week%20of%20catching%20up%2C%20here%20is%20the%20video%20tutorial%20version%20of%20my%20presentation%20at%20WordCamp%20Whistler%2009%20for%20those%20who%20were%20there%20and%20those%20who%20couldn%27t%20come.%20The%20video%20is%20also%20available%20on%20WordPress.tv%20if%20you%27d%20rather%20watch%20it%20there.%20I%20recorded%20the%20video%20over%20the%20weekend%20and%20it%20co%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/&amp;title=Using+WordPress+in+Alternate+Configurations+-+My+WordCamp+Whistler+09+Presentation" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/&amp;title=Using+WordPress+in+Alternate+Configurations+-+My+WordCamp+Whistler+09+Presentation" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/&amp;title=Using+WordPress+in+Alternate+Configurations+-+My+WordCamp+Whistler+09+Presentation" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/&amp;title=Using+WordPress+in+Alternate+Configurations+-+My+WordCamp+Whistler+09+Presentation" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-newsvine">
			<a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/&amp;h=Using+WordPress+in+Alternate+Configurations+-+My+WordCamp+Whistler+09+Presentation" rel="nofollow" class="external" title="Seed this on Newsvine">Seed this on Newsvine</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->



<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/' rel='bookmark' title='Permanent Link: Code snippets from my WordCamp presentation'>Code snippets from my WordCamp presentation</a></li>
<li><a href='http://www.designisphilosophy.com/news/wordcamp-whistler-wordpress-as-cms-20081219/' rel='bookmark' title='Permanent Link: WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS'>WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS</a></li>
<li><a href='http://www.designisphilosophy.com/events/speaking-about-wordpress-as-cms-at-wordcamp-whistler-what-do-you-want-me-to-cover-20090112/' rel='bookmark' title='Permanent Link: Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?'>Speaking about WordPress as CMS at WordCamp Whistler &#8211; What do you want me to cover?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Code snippets from my WordCamp presentation</title>
		<link>http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/</link>
		<comments>http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 17:56:24 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[WordPress as CMS]]></category>
		<category><![CDATA[custom fields]]></category>
		<category><![CDATA[custom page templates]]></category>
		<category><![CDATA[whistler]]></category>
		<category><![CDATA[wordcamp]]></category>
		<category><![CDATA[wordcamp whistler]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.designisphilosophy.com/?p=332</guid>
		<description><![CDATA[Here are some code snippets from my WordCamp Whistler presentation. This article will be expanded in the coming week but in the meantime here they are for anyone wanting to play around with them:
Custom Page Templates in 5 lines of code

&#60;?php
/*
Template Name: Whatever
*/
?&#62;

Custom Fields in one line of code

&#60;?php echo get_post_meta&#40;$post-&#62;ID, '$key', true); ?&#62;

Custom Field [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/' rel='bookmark' title='Permanent Link: Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation'>Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation</a></li>
<li><a href='http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/' rel='bookmark' title='Permanent Link: Using Conditional Custom Fields for Advanced Layouts'>Using Conditional Custom Fields for Advanced Layouts</a></li>
<li><a href='http://www.designisphilosophy.com/news/wordcamp-whistler-wordpress-as-cms-20081219/' rel='bookmark' title='Permanent Link: WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS'>WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Here are some code snippets from my WordCamp Whistler presentation. This article will be expanded in the coming week but in the meantime here they are for anyone wanting to play around with them:</p>
<h3>Custom Page Templates in 5 lines of code</h3>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php</span>
<span style="color: #009900;"><span style="color: #66cc66;">/</span>*</span>
<span style="color: #009900;">Template <span style="color: #000066;">Name</span>: Whatever</span>
<span style="color: #009900;">*<span style="color: #66cc66;">/</span></span>
<span style="color: #009900;">?&gt;</span></pre></div></div>

<h3>Custom Fields in one line of code</h3>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php echo get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, '$key', true); ?&gt;</pre></div></div>

<h3>Custom Field that parses PHP code</h3>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php $boxContent <span style="color: #66cc66;">=</span> get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, 'centerBox', true); ?&gt;
<span style="color: #009900;">&lt;?php eval<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'?'</span>.<span style="color: #ff0000;">'&gt;</span></span>'.$boxContent); ?&gt;</pre></div></div>



<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Code+snippets+from+my+WordCamp+presentation+-+http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/+" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/&amp;t=Code+snippets+from+my+WordCamp+presentation" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Code%20snippets%20from%20my%20WordCamp%20presentation%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22Here%20are%20some%20code%20snippets%20from%20my%20WordCamp%20Whistler%20presentation.%20This%20article%20will%20be%20expanded%20in%20the%20coming%20week%20but%20in%20the%20meantime%20here%20they%20are%20for%20anyone%20wanting%20to%20play%20around%20with%20them%3A%0D%0ACustom%20Page%20Templates%20in%205%20lines%20of%20code%0D%0A%0D%0A%0D%0A%0D%0ACustom%20Fields%20in%20one%20line%20of%20code%0D%0A%0D%0A%0D%0A%0D%0ACustom%20Field%20t%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/&amp;title=Code+snippets+from+my+WordCamp+presentation" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/&amp;title=Code+snippets+from+my+WordCamp+presentation" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/&amp;title=Code+snippets+from+my+WordCamp+presentation" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/&amp;title=Code+snippets+from+my+WordCamp+presentation" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-newsvine">
			<a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/&amp;h=Code+snippets+from+my+WordCamp+presentation" rel="nofollow" class="external" title="Seed this on Newsvine">Seed this on Newsvine</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->



<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/' rel='bookmark' title='Permanent Link: Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation'>Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation</a></li>
<li><a href='http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/' rel='bookmark' title='Permanent Link: Using Conditional Custom Fields for Advanced Layouts'>Using Conditional Custom Fields for Advanced Layouts</a></li>
<li><a href='http://www.designisphilosophy.com/news/wordcamp-whistler-wordpress-as-cms-20081219/' rel='bookmark' title='Permanent Link: WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS'>WordCamp Whistler Pitch: Moving Beyond the Blog &#8211; Building Web Sites with WordPress as the CMS</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using Conditional Custom Fields for Advanced Layouts</title>
		<link>http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/</link>
		<comments>http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 08:37:17 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[custom fields]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.pinkandyellow.com/?p=276</guid>
		<description><![CDATA[An often overlooked function in the WordPress arsenal is Custom Fields. Overlooked because to most it makes no sense: What do you use a custom field for? And how do you use it? The answers to these questions differ depending on how the WordPress theme has been set up: Custom fields can be used for [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/' rel='bookmark' title='Permanent Link: Code snippets from my WordCamp presentation'>Code snippets from my WordCamp presentation</a></li>
<li><a href='http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/' rel='bookmark' title='Permanent Link: Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation'>Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation</a></li>
<li><a href='http://www.designisphilosophy.com/wordpress-as-cms/bcit-class-materials-20090821/' rel='bookmark' title='Permanent Link: BCIT Class Materials'>BCIT Class Materials</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>An often overlooked function in the WordPress arsenal is Custom Fields. Overlooked because to most it makes no sense: What do you use a custom field for? And how do you use it? The answers to these questions differ depending on how the WordPress theme has been set up: Custom fields can be used for everything from passing information to plug-ins like Next Gen Gallery to feeding custom areas in the template with information. But it goes way beyond that. Custom Fields can also be used to create advanced layouts and design variances that can be triggered on a page by page or post by post basis. And this tehcnique can be edhanced further by adding conditions to the scripts so that the changes only appear when the field is actually activated.</p>
<h3>Understanding custom fields</h3>
<p>You can add custom fields to any WordPress post or page through the custom fields interface found right underneath the main text area. The custom field contains two elements; a name and a value. These are pretty self explanatory: When the template asks the server for the name, the value is returned. But this also means that unless the template actually asks for the field by name, nothing is returned. An example to show how this works in real life:</p>
<p><img class="aligncenter size-full wp-image-278" title="Artist menu" src="http://blog.pinkandyellow.com/wp-content/uploads/2008/12/artistmen.jpg" alt="Artist menu" width="498" height="143" />A web site for an art gallery requires each artist page to have a series of sub-pages containing an artists statement, bio, CV and image gallery. Although adding an unordered list directly to the text body of the page would work, it would require the addition of style elements and tags &#8211; something WordPress doesn&#8217;t like very much. Not to mention it&#8217;s also cumbersome and messy. A better solution is to place all the style tags in the template and then just feed the menu in the form of a standard unordered list from a custom field, in this case with the name &#8220;artistMenu&#8221;. Then all that&#8217;s left is to get the template to call for the info in the custom field like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;artistMenu&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;?php echo get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, &quot;artistMenu&quot;, true); ?&gt;		
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>When the template is opened, the content of the custom field named &#8220;artistMenu&#8221; is placed as a string inside the artistMenu div. (To understand exactly how the php code works you can read about the <a title="More info on the get_post_meta tag" href="http://codex.wordpress.org/Function_Reference/get_post_meta" target="_blank">get_post_meta</a> template tag in the WordPress Codex.)</p>
<h3>Making the custom fields conditional</h3>
<p>The problem with the example above is that even if there is no custom field defined, the div is still placed in the page taking up space. Not a big problem when it&#8217;s just a horizontal menu but if you use a custom field to populate something larger, like an image gallery or a text box, it will look weird if the box is left empty. One way of avoiding this is to make two separate templates, one with the custom field code and one without, but that can quickly become complicated. And the whole idea here is to make things simpler, not more complicated. A better way is to make the code and the call for the custom field conditional on whether the custom field has been defined in the first place. This can be done with a simple <em>if</em> statement:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php  if<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, &quot;artistMenu&quot;, true))) { ?&gt;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;artistMenu&quot;</span>&gt;</span>
		<span style="color: #009900;">&lt;?php echo get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, &quot;artistMenu&quot;, true); ?&gt;		
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;?php <span style="color: #66cc66;">&#125;</span> ?&gt;</span></pre></div></div>

<h3>Using conditional custom fields as design elements</h3>
<p>Now for the really cool stuff: Because we can make custom fields conditional, and because we can populate them with pretty much anything, we can use them not only to add images or text but also to add all new design and layout elements. In the site I built for <a title="Sablok &amp; Sablok - Notaries Public" href="http://sablok.com" target="_blank">Sablok &amp; Salbok Notaries Public</a> I used this technique to create a header element that only appears if the custom field is populated by an image or text. The actual appearance of the element is controlled by standard CSS. You can see this layout element as the blue horizontal area in the image and on the front page of the site.</p>
<p><img class="aligncenter size-full wp-image-279" title="Sablok &amp; Sablok custom field" src="http://blog.pinkandyellow.com/wp-content/uploads/2008/12/sablok.jpg" alt="Sablok &amp; Sablok custom field" width="499" height="203" />In this particular example the custom field can be populated by an image. Rather than forcing the user to input all the image code in the custom field manually I added some extra code in the template that gathers the width and height of the image and creates the proper element code. As a result all the user has to do is provide the URL for the image. There is also an <em>or</em> condition in the <em>if</em> statement so that the custom field code in the template is triggered either when an image field or a text field is defined:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php  if<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, &quot;image&quot;, true)) || (get_post_meta($post-&gt;ID, &quot;text&quot;, true))) { ?&gt;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;subheader&quot;</span>&gt;</span>
&nbsp;
		<span style="color: #009900;">&lt;?php if<span style="color: #66cc66;">&#40;</span>get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, &quot;image&quot;, true)) {
		$size = getimagesize(get_post_meta($post-&gt;ID, &quot;image&quot;, true)); ?&gt;
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo get_post_meta($post-&gt;</span></span>ID, &quot;image&quot;, true); ?&gt;&quot; alt=&quot;&quot; width=&quot;<span style="color: #009900;">&lt;?php echo $size<span style="color: #66cc66;">&#91;</span>0<span style="color: #66cc66;">&#93;</span>; ?&gt;</span>&quot; height=&quot;<span style="color: #009900;">&lt;?php echo $size<span style="color: #66cc66;">&#91;</span>1<span style="color: #66cc66;">&#93;</span>; ?&gt;</span>&quot; /&gt;
		<span style="color: #009900;">&lt;?php <span style="color: #66cc66;">&#125;</span> ?&gt;</span>
&nbsp;
		<span style="color: #009900;">&lt;?php if<span style="color: #66cc66;">&#40;</span>get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, &quot;text&quot;, true)) {?&gt;
		<span style="color: #009900;">&lt;?php echo get_post_meta<span style="color: #66cc66;">&#40;</span>$post-&gt;</span>ID, &quot;text&quot;, true); ?&gt;
		<span style="color: #009900;">&lt;?php <span style="color: #66cc66;">&#125;</span> ?&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span> <span style="color: #808080; font-style: italic;">&lt;!-- END SUBHEADER --&gt;</span>
<span style="color: #009900;">&lt;?php <span style="color: #66cc66;">&#125;</span> ?&gt;</span></pre></div></div>



<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Using+Conditional+Custom+Fields+for+Advanced+Layouts+-+http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/+" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/&amp;t=Using+Conditional+Custom+Fields+for+Advanced+Layouts" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Using%20Conditional%20Custom%20Fields%20for%20Advanced%20Layouts%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22An%20often%20overlooked%20function%20in%20the%20WordPress%20arsenal%20is%20Custom%20Fields.%20Overlooked%20because%20to%20most%20it%20makes%20no%20sense%3A%20What%20do%20you%20use%20a%20custom%20field%20for%3F%20And%20how%20do%20you%20use%20it%3F%20The%20answers%20to%20these%20questions%20differ%20depending%20on%20how%20the%20WordPress%20theme%20has%20been%20set%20up%3A%20Custom%20fields%20can%20be%20used%20for%20e%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/&amp;title=Using+Conditional+Custom+Fields+for+Advanced+Layouts" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/&amp;title=Using+Conditional+Custom+Fields+for+Advanced+Layouts" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/&amp;title=Using+Conditional+Custom+Fields+for+Advanced+Layouts" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/&amp;title=Using+Conditional+Custom+Fields+for+Advanced+Layouts" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-newsvine">
			<a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/&amp;h=Using+Conditional+Custom+Fields+for+Advanced+Layouts" rel="nofollow" class="external" title="Seed this on Newsvine">Seed this on Newsvine</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->



<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/tutorials/code-snippets-from-my-wordcamp-presentation-20090124/' rel='bookmark' title='Permanent Link: Code snippets from my WordCamp presentation'>Code snippets from my WordCamp presentation</a></li>
<li><a href='http://www.designisphilosophy.com/video-tutorials/using-wordpress-in-alternate-configurations-my-wordcamp-whistler-09-presentation-20090203/' rel='bookmark' title='Permanent Link: Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation'>Using WordPress in Alternate Configurations &#8211; My WordCamp Whistler 09 Presentation</a></li>
<li><a href='http://www.designisphilosophy.com/wordpress-as-cms/bcit-class-materials-20090821/' rel='bookmark' title='Permanent Link: BCIT Class Materials'>BCIT Class Materials</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/tutorials/using-conditional-custom-fields-for-advanced-layouts-20081219/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Highlight current page in WordPress menus</title>
		<link>http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/</link>
		<comments>http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 00:33:36 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.pinkandyellow.com/?p=191</guid>
		<description><![CDATA[WordPress has a lot of built in functionality that you can tap for advanced customization. One of these which is often ignored is the ability to highlight the current page in menus with CSS. By default, WordPress assigns a special style class to the button that points to the current page. By styling this class [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/microsoft-expression-web/new-wordpress-based-site-the-readers-companion-20081002/' rel='bookmark' title='Permanent Link: New WordPress based site: The Reader&#8217;s Companion'>New WordPress based site: The Reader&#8217;s Companion</a></li>
<li><a href='http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/' rel='bookmark' title='Permanent Link: Create a Twitter box in your sidebar'>Create a Twitter box in your sidebar</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression-web/center-a-page-horizontally-using-css-an-expansion-20080322/' rel='bookmark' title='Permanent Link: Center a Page Horizontally Using CSS &#8211; An Expansion'>Center a Page Horizontally Using CSS &#8211; An Expansion</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-194" title="Current Page Menu Item" src="http://blog.pinkandyellow.com/wp-content/uploads/2008/11/currentpageitemmenu.jpg" alt="" width="500" height="42" />WordPress has a lot of built in functionality that you can tap for advanced customization. One of these which is often ignored is the ability to highlight the current page in menus with CSS. By default, WordPress assigns a special style class to the button that points to the current page. By styling this class differently from the &#8220;regular&#8221; classes the current page button is highlighted.</p>
<p>In this tutorial we&#8217;ll look at how to utilize the built in current page styling, how to create a menu like the one you see <a href="http://blog.pinkandyellow.com/tutorials/selectedTab/selectedTabDemo.html" title="Fancy menu example" target="_blank">above</a> and also how to hard code the functionality into a menu that is not generated dynamically by WordPress.</p>
<h4>Identifying the custom styles</h4>
<p>If you view the source code of a WordPress blog with a menu like the <a title="The reader's companion to my book" href="http://expression.pinkandyellow.com/" target="_blank">Reader’s Companion</a> you&#8217;ll see that the menu items have been given different classes automatically by the CMS:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page_item current_page_item&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://expression.pinkandyellow.com&quot;</span>&gt;</span>home<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page_item page-item-9&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Lesson Files&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://expression.pinkandyellow.com/lesson-files/&quot;</span>&gt;</span>Lesson Files<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page_item page-item-11&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;About the Author&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://expression.pinkandyellow.com/about-the-author/&quot;</span>&gt;</span>About the Author<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page_item page-item-13&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;FAQ&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://expression.pinkandyellow.com/faq/&quot;</span>&gt;</span>FAQ<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page_item page-item-15&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Further Reading&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://expression.pinkandyellow.com/further-reading/&quot;</span>&gt;</span>Further Reading<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page_item page-item-17&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Contact&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://expression.pinkandyellow.com/contact/&quot;</span>&gt;</span>Contact<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>The important classes here are <em>page_item</em> which styles all the menu items and <em>current_page_item</em> which is only applied to the current page item. By styling these two classes independently you can get some very nice results. To demonstrate how far you can take this I&#8217;ve made a mock-up page that simulates the end output of a WordPress menu with custom styling. You can find it <a title="Current selected page tab demo" href="http://blog.pinkandyellow.com/tutorials/selectedTab/selectedTabDemo.html" target="_blank">here</a>.</p>
<p>By taking a closer look at the CSS you&#8217;ll see that the <em>page_item</em> and <em>current_page_item</em> classes have different styling. The remainder of the code is set up to make the button backgrounds expand and contract in accordance with the <a title="Sliding Door at AListApart.com" href="http://www.alistapart.com/articles/slidingdoors/" target="_blank">Sliding Doors technique from A List Apart</a>.The CSS code on the demo page is identical to the CSS code being used to style the page itself:</p>
<p><em>page_item</em> styles:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.page_item</span> a <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;img/right-over.png&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">right</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">6px</span> <span style="color: #933;">15px</span> <span style="color: #933;">7px</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#DDDDDD</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.page_item</span> a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #993333;">white</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><em>current_page_item</em> styles:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.current_page_item</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;img/left-selected.png&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> 0 0 0 <span style="color: #933;">8px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.current_page_item</span> a<span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.current_page_item</span> a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;img/right-selected.png&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">right</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">6px</span> <span style="color: #933;">15px</span> <span style="color: #933;">7px</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#C7532D</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>If you already have your menu up and running properly, all you need to do is style these two classes and you&#8217;ll automatically have the current page highlighted in your menu. But this only applies to dynamic menus generated by WordPress. What happens when you hard code your menus yourself?</p>
<h4>Assign dynamic styles to hard-coded menus</h4>
<p>To get the same effect when you create a hard-coded menu you need to apply some clever PHP code to each of your menu items.</p>
<p>If you don&#8217;t understand what I mean by &#8220;hard-coded menu&#8221; consider this: By default your menu is called by a function within WordPress that lists all of your pages plus the Home page. This call usually looks something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php wp_list_pages<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'title_li=&amp;depth=1'</span><span style="color: #66cc66;">&#41;</span>; ?&gt;</span></pre></div></div>

<p>But this function lists all your pages. If  you only want certain pages listed you have to take this function out and create a manual list yourself. This is a hard-coded menu.</p>
<p>To make the <em>current_page_item</em> class apply only to the current page item you need to add a small piece of PHP to each of your menu items. This line of code looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php if <span style="color: #66cc66;">&#40;</span>is_page<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'home'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> echo <span style="color: #ff0000;">&quot;current_page_item&quot;</span>; <span style="color: #66cc66;">&#125;</span>?&gt;</span></pre></div></div>

<p>and is applied inside the <em>li</em> tag of each item. To give a concrete example I have added this code to the list items in the list example at the beginning of this tutorial:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page_item &lt;?php if (is_page('home')) { echo &quot;</span>current_page_item<span style="color: #ff0000;">&quot;; }?&gt;</span></span>&quot;&gt;<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://expression.pinkandyellow.com&quot;</span>&gt;</span>home<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page_item page-item-9 &lt;?php if (is_page('Lesson Files')) { echo &quot;</span>current_page_item<span style="color: #ff0000;">&quot;; }?&gt;</span></span>&quot;&gt;<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Lesson Files&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://expression.pinkandyellow.com/lesson-files/&quot;</span>&gt;</span>Lesson Files<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page_item page-item-11 &lt;?php if (is_page('About the Author')) { echo &quot;</span>current_page_item<span style="color: #ff0000;">&quot;; }?&gt;</span></span>&quot;&gt;<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;About the Author&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://expression.pinkandyellow.com/about-the-author/&quot;</span>&gt;</span>About the Author<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page_item page-item-13 &lt;?php if (is_page('FAQ')) { echo &quot;</span>current_page_item<span style="color: #ff0000;">&quot;; }?&gt;</span></span>&quot;&gt;<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;FAQ&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://expression.pinkandyellow.com/faq/&quot;</span>&gt;</span>FAQ<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page_item page-item-15 &lt;?php if (is_page('Further Reading')) { echo &quot;</span>current_page_item<span style="color: #ff0000;">&quot;; }?&gt;</span></span>&quot;&gt;<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Further Reading&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://expression.pinkandyellow.com/further-reading/&quot;</span>&gt;</span>Further Reading<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page_item page-item-17 &lt;?php if (is_page('Contact')) { echo &quot;</span>current_page_item<span style="color: #ff0000;">&quot;; }?&gt;</span></span>&quot;&gt;<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Contact&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://expression.pinkandyellow.com/contact/&quot;</span>&gt;</span>Contact<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>When the page is loaded the PHP script looks to see if the page name matches the name in the <em>is_page</em> section and if it does, the <em>current_page_item</em> class is applied. Therefore the name you put in the <em>is_page</em> section of the PHP script must match the name of the page as created in WordPress exactly. If it does, the current page item will be highlighted dynamically.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Highlight+current+page+in+WordPress+menus+-+http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/+" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/&amp;t=Highlight+current+page+in+WordPress+menus" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Highlight%20current%20page%20in%20WordPress%20menus%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22WordPress%20has%20a%20lot%20of%20built%20in%20functionality%20that%20you%20can%20tap%20for%20advanced%20customization.%20One%20of%20these%20which%20is%20often%20ignored%20is%20the%20ability%20to%20highlight%20the%20current%20page%20in%20menus%20with%20CSS.%20By%20default%2C%20WordPress%20assigns%20a%20special%20style%20class%20to%20the%20button%20that%20points%20to%20the%20current%20page.%20By%20styling%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/&amp;title=Highlight+current+page+in+WordPress+menus" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/&amp;title=Highlight+current+page+in+WordPress+menus" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/&amp;title=Highlight+current+page+in+WordPress+menus" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/&amp;title=Highlight+current+page+in+WordPress+menus" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-newsvine">
			<a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/&amp;h=Highlight+current+page+in+WordPress+menus" rel="nofollow" class="external" title="Seed this on Newsvine">Seed this on Newsvine</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->



<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/microsoft-expression-web/new-wordpress-based-site-the-readers-companion-20081002/' rel='bookmark' title='Permanent Link: New WordPress based site: The Reader&#8217;s Companion'>New WordPress based site: The Reader&#8217;s Companion</a></li>
<li><a href='http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/' rel='bookmark' title='Permanent Link: Create a Twitter box in your sidebar'>Create a Twitter box in your sidebar</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression-web/center-a-page-horizontally-using-css-an-expansion-20080322/' rel='bookmark' title='Permanent Link: Center a Page Horizontally Using CSS &#8211; An Expansion'>Center a Page Horizontally Using CSS &#8211; An Expansion</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/css/highlight-current-page-in-wordpress-menus-20081118/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Read my article in the Microsoft Expression November Newsletter</title>
		<link>http://www.designisphilosophy.com/microsoft-expression-web/read-my-article-in-the-microsoft-expression-november-newsletter-20081118/</link>
		<comments>http://www.designisphilosophy.com/microsoft-expression-web/read-my-article-in-the-microsoft-expression-november-newsletter-20081118/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 20:26:18 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Expression Web]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[drop-down]]></category>
		<category><![CDATA[expression web]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.pinkandyellow.com/?p=186</guid>
		<description><![CDATA[A month or so ago Microsoft contacted me and asked if I would write an article on Expression Web for their Expression Newsletter. How could I say no to such an opportunity? After some back and forth about the topic I landed on an article on how to create a Pure CSS Drop-Down menu. Over [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/microsoft-expression-web/pure-css-drop-down-menu-tutorial-a-slight-omission-20081121/' rel='bookmark' title='Permanent Link: Pure CSS Drop-Down Menu tutorial &#8211; a slight omission'>Pure CSS Drop-Down Menu tutorial &#8211; a slight omission</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression-web/in-rewrite-mode-new-version-of-my-book-on-the-way-20090428/' rel='bookmark' title='Permanent Link: In rewrite mode: New version of my book on the way!'>In rewrite mode: New version of my book on the way!</a></li>
<li><a href='http://www.designisphilosophy.com/news/my-book-is-featured-in-the-canadian-user-experience-blog-20081201/' rel='bookmark' title='Permanent Link: My book is featured in the Canadian User Experience Blog'>My book is featured in the Canadian User Experience Blog</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://expression.microsoft.com/en-us/dd279540.aspx"><img class="alignleft" title="CSS Based Horizontal Drop-Down Menu" src="http://i.expression.microsoft.com/dd279538.css_menus_fp(en-us,MSDN.10).jpg" alt="" width="210" height="130" /></a>A month or so ago Microsoft contacted me and asked if I would write an article on Expression Web for their Expression Newsletter. How could I say no to such an opportunity? After some back and forth about the topic I landed on an article on <a title="The No-Code Way to a Pure CSS Horizontal Drop-Down Menu with Expression Web" href="http://expression.microsoft.com/en-us/dd279540.aspx" target="_blank">how to create a Pure CSS Drop-Down menu</a>. Over time I&#8217;ve encountered numerous solutions, most of which were clunky and didn&#8217;t work properly. So the tutorial demonstrates how to create a fully functional CSS-only drop-down menu utilizing the excellent CSS features in Expression Web.</p>
<p>That&#8217;s not to say you have to use Expression Web to get something out of the article though. You can follow the tutorial and get the same results even if you&#8217;re using Notepad to build your sites. It&#8217;s just that Expression Web makes it a hell of a lot easier to manage.</p>
<p><a href="http://tinyurl.com/styexpressionweb2"><img class="alignright" title="Sams Teach Yourself Microsoft Expression Web in 24 Hours" src="http://blog.pinkandyellow.com/wp-content/uploads/2008/06/styexpression.jpg" alt="" width="183" height="238" /></a>This article comes hot on the heels of my book <a title="Teach Yourself Expression Web 2 in 24 Hours" href="http://tinyurl.com/styexpressionweb2" target="_blank">Sams Teach Yourself Microsoft Expression Web 2 in 24 Hours</a> which contains an expanded tutorial on the same topic that also covers a layers-based drop-down menu. If you are an Expression Web 2 user of if you are considering buying or switching over to this excellent web authoring and publishing platform I humbly suggest you <a title="Get Teach Yourself Expression Web 2 in 24 Hours from Amazon.com" href="http://tinyurl.com/styexpressionweb2" target="_blank">pick up a copy for yourself</a>. It&#8217;s a quick read and it gives you hour-by-hour instructions on how to create a web site from scratch with the application. And once you&#8217;re done, you&#8217;ll have a fully working and standards based web site at your disposal. I wrote it as the book I wish someone had written when I started out and from the response I&#8217;ve gotten so far people are learning a lot from it. Which is what I set out to do.</p>
<p>If you&#8217;re interested in a preview of the kind of content you&#8217;ll find in the book or you just want to know <a title="The No-Code Way to a Pure CSS Horizontal Drop-Down Menu with Expression Web" href="http://expression.microsoft.com/en-us/dd279540.aspx" target="_blank">how to make a Pure CSS Drop-Down menu</a>, you can <a title="The No-Code Way to a Pure CSS Horizontal Drop-Down Menu with Expression Web" href="http://expression.microsoft.com/en-us/dd279540.aspx" target="_blank">read the full article, The No-Code Way to a Pure CSS Horizontal Drop-Down Menu with Expression Web, here</a> or <a title="Subscribe to the Expression Web Newsletter" href="https://profile.microsoft.com/RegSysProfileCenter/wizard.aspx?wizid=b62e5f03-3188-474a-a5f4-ff0116a3ccaa&amp;lcid=1033" target="_blank">subscribe to the Expression Web Newsletter</a>.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Read+my+article+in+the+Microsoft+Expression+November+Newsletter+-+http://www.designisphilosophy.com/microsoft-expression-web/read-my-article-in-the-microsoft-expression-november-newsletter-20081118/+" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.designisphilosophy.com/microsoft-expression-web/read-my-article-in-the-microsoft-expression-november-newsletter-20081118/&amp;t=Read+my+article+in+the+Microsoft+Expression+November+Newsletter" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Read%20my%20article%20in%20the%20Microsoft%20Expression%20November%20Newsletter%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22A%20month%20or%20so%20ago%20Microsoft%20contacted%20me%20and%20asked%20if%20I%20would%20write%20an%20article%20on%20Expression%20Web%20for%20their%20Expression%20Newsletter.%20How%20could%20I%20say%20no%20to%20such%20an%20opportunity%3F%20After%20some%20back%20and%20forth%20about%20the%20topic%20I%20landed%20on%20an%20article%20on%20how%20to%20create%20a%20Pure%20CSS%20Drop-Down%20menu.%20Over%20time%20I%27ve%20enc%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://www.designisphilosophy.com/microsoft-expression-web/read-my-article-in-the-microsoft-expression-november-newsletter-20081118/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.designisphilosophy.com/microsoft-expression-web/read-my-article-in-the-microsoft-expression-november-newsletter-20081118/&amp;title=Read+my+article+in+the+Microsoft+Expression+November+Newsletter" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://www.designisphilosophy.com/microsoft-expression-web/read-my-article-in-the-microsoft-expression-november-newsletter-20081118/&amp;title=Read+my+article+in+the+Microsoft+Expression+November+Newsletter" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.designisphilosophy.com/microsoft-expression-web/read-my-article-in-the-microsoft-expression-november-newsletter-20081118/&amp;title=Read+my+article+in+the+Microsoft+Expression+November+Newsletter" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.designisphilosophy.com/microsoft-expression-web/read-my-article-in-the-microsoft-expression-november-newsletter-20081118/&amp;title=Read+my+article+in+the+Microsoft+Expression+November+Newsletter" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-newsvine">
			<a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.designisphilosophy.com/microsoft-expression-web/read-my-article-in-the-microsoft-expression-november-newsletter-20081118/&amp;h=Read+my+article+in+the+Microsoft+Expression+November+Newsletter" rel="nofollow" class="external" title="Seed this on Newsvine">Seed this on Newsvine</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->



<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/microsoft-expression-web/pure-css-drop-down-menu-tutorial-a-slight-omission-20081121/' rel='bookmark' title='Permanent Link: Pure CSS Drop-Down Menu tutorial &#8211; a slight omission'>Pure CSS Drop-Down Menu tutorial &#8211; a slight omission</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression-web/in-rewrite-mode-new-version-of-my-book-on-the-way-20090428/' rel='bookmark' title='Permanent Link: In rewrite mode: New version of my book on the way!'>In rewrite mode: New version of my book on the way!</a></li>
<li><a href='http://www.designisphilosophy.com/news/my-book-is-featured-in-the-canadian-user-experience-blog-20081201/' rel='bookmark' title='Permanent Link: My book is featured in the Canadian User Experience Blog'>My book is featured in the Canadian User Experience Blog</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/microsoft-expression-web/read-my-article-in-the-microsoft-expression-november-newsletter-20081118/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Create a Twitter Box in Your Sidebar &#8211; Part II</title>
		<link>http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-part-ii-20081113/</link>
		<comments>http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-part-ii-20081113/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 00:23:32 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.pinkandyellow.com/?p=178</guid>
		<description><![CDATA[My Sidebar Twitter box tutorial seems to have struck a chord with WordPress users and it has generated some interesting questions. One of them, from TheNext2ShineBlog posed an interesting problem I decided to look into in more detail:
the only thing I would like to change is the time aspect (23 days ago // 4 hours [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/' rel='bookmark' title='Permanent Link: Create a Twitter box in your sidebar'>Create a Twitter box in your sidebar</a></li>
<li><a href='http://www.designisphilosophy.com/news/twitter-sucks-20080628/' rel='bookmark' title='Permanent Link: Twitter Sucks!'>Twitter Sucks!</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression-web/expression-web-2-webcast-june-5th-what-do-you-want-to-know-20080529/' rel='bookmark' title='Permanent Link: Expression Web 2 Webcast June 5th &#8211; What do you want to know?'>Expression Web 2 Webcast June 5th &#8211; What do you want to know?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://blog.pinkandyellow.com/css/create-a-twitter-box-in-your-sidebar-20081106" title="Create a Twitter Box in Your Sidebar - the original tutorial" target="_blank">Sidebar Twitter box tutorial</a> seems to have struck a chord with WordPress users and it has generated some interesting questions. One of them, from <a href="http://blog.thenext2shine.com/" title="The Next 2 Shine Blog" target="_blank">TheNext2ShineBlog</a> posed <a title="The original comment" href="http://blog.pinkandyellow.com/css/create-a-twitter-box-in-your-sidebar-20081106/#comment-19731" target="_blank">an interesting problem</a> I decided to look into in more detail:</p>
<blockquote><p>the only thing I would like to change is the time aspect (23 days ago // 4 hours ago). Is there a css code to hide that link without taking away the links from the original twitter message?</p></blockquote>
<p>What TheN2S is refering to is the tail end of each Twitter message that reads either &#8220;less than a minute ago&#8221;, &#8220;a few minutes ago&#8221; etc up to &#8220;X days ago&#8221;.</p>
<p>Careful inspection of the JavaScript that generates the Tweets for the application (<a title="Twitter's Blogger JS" href="http://twitter.com/javascripts/blogger.js" target="_blank">found here</a>) shows that the time information is a core function of the Twitter system so it is coded into the main structure of the application itself. Therefore it is hard to siply remove it unless you want to create your own custom JS. But TheN2S is on the right track in asking if it can be removed by way of CSS.</p>
<p>Lifting a random tweet off my own site I found that the main body the JS spits out is contained within a <em>span</em> tag while the tail end with the time info is not:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span>&gt;</span>@<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.twitter.com/webb_art&quot;</span>&gt;</span>webb_art<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span> DropBox works well for me and is platform independent: <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.getdropbox.com/&quot;</span>&gt;</span>	http://www.getdropbox.com/<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span>
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://twitter.com/mor10/statuses/1003495851&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;font-size: 85%;&quot;</span>&gt;</span> about 15 hours ago<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span></pre></div></div>

<p>That means we can use CSS to hide the content <em>not</em> in the <em><span></em> while maintaining the visibility of the content that is. That requires some additions to the original CSS code:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#twitter_div</span> ul li span <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">visible</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#twitter_div</span> ul li span a <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#D78E42</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">visible</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#twitter_div</span> ul li a <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The first two single out the regular and link contents within the <em>span</em> specifically and set their visibility to visible. This is done because the last style sets the visibility of all anchors within list items under the <em>twitter_div</em> ID to hidden. So we are really working backwards &#8211; first hiding everything and then unhiding it in particular cases.</p>
<p>By adding these three style elements the time information will be hidden by the CSS while everything else shows up normally.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Create+a+Twitter+Box+in+Your+Sidebar+-+Part+II+-+http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-part-ii-20081113/+" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-part-ii-20081113/&amp;t=Create+a+Twitter+Box+in+Your+Sidebar+-+Part+II" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Create%20a%20Twitter%20Box%20in%20Your%20Sidebar%20-%20Part%20II%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22My%20Sidebar%20Twitter%20box%20tutorial%20seems%20to%20have%20struck%20a%20chord%20with%20WordPress%20users%20and%20it%20has%20generated%20some%20interesting%20questions.%20One%20of%20them%2C%20from%20TheNext2ShineBlog%20posed%20an%20interesting%20problem%20I%20decided%20to%20look%20into%20in%20more%20detail%3A%0D%0Athe%20only%20thing%20I%20would%20like%20to%20change%20is%20the%20time%20aspect%20%2823%20day%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-part-ii-20081113/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-part-ii-20081113/&amp;title=Create+a+Twitter+Box+in+Your+Sidebar+-+Part+II" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-part-ii-20081113/&amp;title=Create+a+Twitter+Box+in+Your+Sidebar+-+Part+II" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-part-ii-20081113/&amp;title=Create+a+Twitter+Box+in+Your+Sidebar+-+Part+II" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-part-ii-20081113/&amp;title=Create+a+Twitter+Box+in+Your+Sidebar+-+Part+II" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-newsvine">
			<a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-part-ii-20081113/&amp;h=Create+a+Twitter+Box+in+Your+Sidebar+-+Part+II" rel="nofollow" class="external" title="Seed this on Newsvine">Seed this on Newsvine</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->



<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/' rel='bookmark' title='Permanent Link: Create a Twitter box in your sidebar'>Create a Twitter box in your sidebar</a></li>
<li><a href='http://www.designisphilosophy.com/news/twitter-sucks-20080628/' rel='bookmark' title='Permanent Link: Twitter Sucks!'>Twitter Sucks!</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression-web/expression-web-2-webcast-june-5th-what-do-you-want-to-know-20080529/' rel='bookmark' title='Permanent Link: Expression Web 2 Webcast June 5th &#8211; What do you want to know?'>Expression Web 2 Webcast June 5th &#8211; What do you want to know?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-part-ii-20081113/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Create a Twitter box in your sidebar</title>
		<link>http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/</link>
		<comments>http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 03:44:39 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.pinkandyellow.com/?p=130</guid>
		<description><![CDATA[As part of the new design for this blog I added a Twitter box in the sidebar. There are hundreds of WordPress plugins that do this for you but they are all quite involved and they bog down the blog unnecessarily. Much easier to just hard code the box into your blog yourself. It&#8217;s actually [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-part-ii-20081113/' rel='bookmark' title='Permanent Link: Create a Twitter Box in Your Sidebar &#8211; Part II'>Create a Twitter Box in Your Sidebar &#8211; Part II</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression-web/selected-pages-an-answer-for-beal-20080111/' rel='bookmark' title='Permanent Link: Selected Pages &#8211; an answer for Beal'>Selected Pages &#8211; an answer for Beal</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression-web/fancy-interactive-pure-css-list-boxes-with-hover-effect-20080503/' rel='bookmark' title='Permanent Link: Fancy Interactive Pure CSS List Boxes with Hover Effect'>Fancy Interactive Pure CSS List Boxes with Hover Effect</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.pinkandyellow.com/wp-content/uploads/2008/11/twitterbox.jpg"><img src="http://blog.pinkandyellow.com/wp-content/uploads/2008/11/twitterbox.jpg" alt="" title="My fancy Twitter box" width="360" height="158" class="alignleft size-full wp-image-131" /></a>As part of the new design for this blog I added a Twitter box in the sidebar. There are hundreds of WordPress plugins that do this for you but they are all quite involved and they bog down the blog unnecessarily. Much easier to just hard code the box into your blog yourself. It&#8217;s actually surprisingly easy to do, but the code that Twitter provides is a bit wonky (and shockingly it doesn&#8217;t validate!).</p>
<p>In this tutorial you&#8217;ll learn how to easily create a fancy box that displays your latest Twitter rants in your sidebar without having to turn to clunky plug-ins that bog your blog down.</p>
<h4>Get your Twitter Badge</h4>
<p>To start off with you need your Twitter Badge. This is the official Twitter JavaScript that passes your latest tweets to wherever you want. You can get your badge at <a title="Get your Twitter Badge" href="http://twitter.com/badges" target="_blank">twitter.com/badges</a>. Twitter has custom badges for MySpace, Blogger, Facebook and TypePad but surprisingly nothing for WordPress. That doesn&#8217;t really matter because it&#8217;s actually easier to just make one of your own.</p>
<p>Select <strong>Other</strong> and you are taken to page two which presents three options:</p>
<ol>
<li>Flash (Just Me) &#8211; hideous</li>
<li>Flash with Friends &#8211; even more hideous</li>
<li>HTML/JavaScript &#8211; great for people with eyes</li>
</ol>
<p>Select the last option (HTML/JavaScript) and you are taken to page 3 where you can customize the code by defining how many tweets you want and what the Badge title should be. I chose 2 tweets and turned the title off. This provided me with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;twitter_div&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;twitter_update_list&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://twitter.com/javascripts/blogger.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://twitter.com/statuses/user_timeline/mor10.json?callback=twitterCallback2&amp;amp;count=2&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>(This code will of course differ depending on your settings.)</p>
<p>Paste the code in wherever you want on your site or your blog.</p>
<h4>Style your Badge</h4>
<p>The Twitter Badge comes equipped with JavaScript that injects the tweets into your badge in the form of unordered list items as well as built in style elements. They are: <i>#twitter_div</i> (styles the badge wrap), <i>.sidebar_title</i> (styles the title) and <i>#twitter_update_list</i> (styles the unordered list).</p>
<p>Before you start styling, you have to fix the generated code to make it validate. Since it is the JavaScript that actually generates the list items, browsers and validators get all cranky about the code because there are no list items within the unordered list in the markup itself. Therefore you need to insert an empty list item just to please the W3C gods:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;twitter_div&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;twitter_update_list&quot;</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://twitter.com/javascripts/blogger.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://twitter.com/statuses/user_timeline/mor10.json?callback=twitterCallback2&amp;amp;count=2&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>Once that&#8217;s settled you can start styling your elements. Again because of the JavaScript you have to stick with the names Twitter provides, but that shouldn&#8217;t cause any problems. For my Twitter Badge I created a background PNG much larger than what I actually needed to accommodate a future situation where I would add more than 2 tweets at a time (which you can see by <a href="http://blog.pinkandyellow.com/wp-content/themes/DesignIsPhilosophy/img/twitterBG.png" title="The twitter box background" target="image">clicking here</a>). The background graphic is cut off by a matching blue bottom border. The whole style package looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#twitter_div</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'img/twitterBG.png'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-bottom-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-bottom-width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-bottom-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#5AA5BC</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0.9em</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#twitter_div</span> ul li <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#0C93BA</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-bottom-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-bottom-width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-bottom-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#A1E8F7</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#twitter_div</span> ul li a <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#DDA84E</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#twitter_div</span> ul li a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#D78E42</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#twitter_div</span> p <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<h4>Add a link for future followers</h4>
<p>The observant reader will notice that there&#8217;s still one element missing: The Follow me on Twitter link in the bottom right corner. That&#8217;s the reason for the p style in the CSS code as well. So with the follow link, the final HTML markup looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- TWITTER --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;twitter_div&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;twitter_update_list&quot;</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://twitter.com/mor10&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Follow me on Twitter&quot;</span> <span style="color: #000066;">target</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Twitter&quot;</span>&gt;</span>Follow me on Twitter<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://twitter.com/javascripts/blogger.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://twitter.com/statuses/user_timeline/mor10.json?callback=twitterCallback2&amp;amp;count=2&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;!-- END TWITTER --&gt;</span></pre></div></div>

<p>And with that you have a fancy Twitter box you can put in your sidebar without bogging your blog down with plug-ins.</p>
<p>Read the <a href="http://blog.pinkandyellow.com/css/create-a-twitter-box-in-your-sidebar-part-ii-20081113/" title="Create a Twitter Box in Your Sidebar - Part II" target="_blank">second half of this tutorial</a>, in which you learn how to hide the time stamp at the tail end of the Tweets.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Create+a+Twitter+box+in+your+sidebar+-+http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/+" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/&amp;t=Create+a+Twitter+box+in+your+sidebar" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Create%20a%20Twitter%20box%20in%20your%20sidebar%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22As%20part%20of%20the%20new%20design%20for%20this%20blog%20I%20added%20a%20Twitter%20box%20in%20the%20sidebar.%20There%20are%20hundreds%20of%20WordPress%20plugins%20that%20do%20this%20for%20you%20but%20they%20are%20all%20quite%20involved%20and%20they%20bog%20down%20the%20blog%20unnecessarily.%20Much%20easier%20to%20just%20hard%20code%20the%20box%20into%20your%20blog%20yourself.%20It%27s%20actually%20surprising%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/&amp;title=Create+a+Twitter+box+in+your+sidebar" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/&amp;title=Create+a+Twitter+box+in+your+sidebar" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/&amp;title=Create+a+Twitter+box+in+your+sidebar" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/&amp;title=Create+a+Twitter+box+in+your+sidebar" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-newsvine">
			<a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/&amp;h=Create+a+Twitter+box+in+your+sidebar" rel="nofollow" class="external" title="Seed this on Newsvine">Seed this on Newsvine</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->



<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-part-ii-20081113/' rel='bookmark' title='Permanent Link: Create a Twitter Box in Your Sidebar &#8211; Part II'>Create a Twitter Box in Your Sidebar &#8211; Part II</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression-web/selected-pages-an-answer-for-beal-20080111/' rel='bookmark' title='Permanent Link: Selected Pages &#8211; an answer for Beal'>Selected Pages &#8211; an answer for Beal</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression-web/fancy-interactive-pure-css-list-boxes-with-hover-effect-20080503/' rel='bookmark' title='Permanent Link: Fancy Interactive Pure CSS List Boxes with Hover Effect'>Fancy Interactive Pure CSS List Boxes with Hover Effect</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/css/create-a-twitter-box-in-your-sidebar-20081106/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
		</item>
		<item>
		<title>Previewing Silverlight Applications in Your Browser With Expression Development Server</title>
		<link>http://www.designisphilosophy.com/microsoft-expression-web/previewing-silverlight-applications-in-your-browser-with-expression-development-server-20080803/</link>
		<comments>http://www.designisphilosophy.com/microsoft-expression-web/previewing-silverlight-applications-in-your-browser-with-expression-development-server-20080803/#comments</comments>
		<pubDate>Sun, 03 Aug 2008 22:10:32 +0000</pubDate>
		<dc:creator>Morten Rand-Hendriksen</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Expression Web]]></category>
		<category><![CDATA[My Book]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[expression web]]></category>
		<category><![CDATA[preview]]></category>

		<guid isPermaLink="false">http://blog.pinkandyellow.com/?p=98</guid>
		<description><![CDATA[If you&#8217;ve tried placing a Silverlight application in a HTML page in Expression Web 2 (or any other web authoring application for that matter) and previewing it in your browser you know it doesn&#8217;t work. Here is a small exerpt from my upcoming book Sams Teach Yourself Microsoft Expression Web 2 in 24 Hours that [...]


Related posts:<ol><li><a href='http://www.designisphilosophy.com/microsoft-expression/posting-a-silverlight-application-major-headache-20070806/' rel='bookmark' title='Permanent Link: Posting a Silverlight Application &#8211; Major Headache'>Posting a Silverlight Application &#8211; Major Headache</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression/silverlight-posting-test-20070808/' rel='bookmark' title='Permanent Link: Silverlight Posting Issues &#8211; Solved'>Silverlight Posting Issues &#8211; Solved</a></li>
<li><a href='http://www.designisphilosophy.com/silverlight/silverlight-in-opera-20080312/' rel='bookmark' title='Permanent Link: Silverlight in Opera (but no Silverligth 2 &#8211; at least not yet)'>Silverlight in Opera (but no Silverligth 2 &#8211; at least not yet)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve tried placing a Silverlight application in a HTML page in Expression Web 2 (or any other web authoring application for that matter) and previewing it in your browser you know it doesn&#8217;t work. Here is a small exerpt from my upcoming book <a title="Buy it!" href="http://www.amazon.com/gp/product/0672330296?ie=UTF8&amp;tag=dabblerca0a-20&amp;link_code=as3&amp;camp=211189&amp;creative=373489&amp;creativeASIN=0672330296" target="_blank">Sams Teach Yourself Microsoft Expression Web 2 in 24 Hours</a> that explains how you can use the Expression Development Server to trick your browser into previewing Silverlight applications without having to run them off a server:</p>
<p>To make sure everything is working properly, you should preview the page in your browser. But if you do all you’ll see is an empty white page. This is because Silverlight is a server-side script that must be running on a web server to work properly. In other words technically you need to upload your files to a web server and test them from there. Fortunately there is a way around this problem: Because a big part of Expression Web 2 is the ability to create advanced dynamic websites using Microsoft’s server-side script language ASP.NET, the program comes equipped with a small application called Expression Development Server. This application creates a virtual server on your computer that behaves like a web server and lets you run server-side scripts in pages even though they are only stored on your computer. You will be introduced to the Expression Development Server in more detail in Hours 22, &#8220;Beyond the Basics: PHP in Expression Web 2,&#8221; and 23, &#8220;Beyond the Basics Part 2: Building a Site with ASP.NET.&#8221;</p>
<p>The problem at hand is that the Silverlight script will run only on a web server. So to be able to preview the application you need to make Expression Web 2 think that the page you are currently working with is actually an ASP.NET page. That way it will be previewed using Expression Development Server and the Silverlight script will run properly. Doing so is surprisingly simple: Open the HTML file that contains the Silverlight application you want to preview, select <em><strong>File</strong></em>, <em><strong>Save As</strong></em> on the menu bar, and change the file extension to <strong><em>.aspx</em></strong> &#8211; the extension for ASP.NET pages that can contain regular HTML code. Now when you open the page it will be previewed in the browser through Expression Development Server and the Silverlight application will run properly.</p>
<p>Clever eh? Now go crack open your piggybank and <a title="Possibly the best book ever written!" href="http://www.amazon.com/gp/product/0672330296?ie=UTF8&amp;tag=dabblerca0a-20&amp;link_code=as3&amp;camp=211189&amp;creative=373489&amp;creativeASIN=0672330296" target="_blank">buy my book</a>!</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Previewing+Silverlight+Applications+in+Your+Browser+With+Expression+Development+%5B..%5D+-+http://www.designisphilosophy.com/microsoft-expression-web/previewing-silverlight-applications-in-your-browser-with-expression-development-server-20080803/+" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.designisphilosophy.com/microsoft-expression-web/previewing-silverlight-applications-in-your-browser-with-expression-development-server-20080803/&amp;t=Previewing+Silverlight+Applications+in+Your+Browser+With+Expression+Development+Server" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Previewing%20Silverlight%20Applications%20in%20Your%20Browser%20With%20Expression%20Development%20Server%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22If%20you%27ve%20tried%20placing%20a%20Silverlight%20application%20in%20a%20HTML%20page%20in%20Expression%20Web%202%20%28or%20any%20other%20web%20authoring%20application%20for%20that%20matter%29%20and%20previewing%20it%20in%20your%20browser%20you%20know%20it%20doesn%27t%20work.%20Here%20is%20a%20small%20exerpt%20from%20my%20upcoming%20book%20Sams%20Teach%20Yourself%20Microsoft%20Expression%20Web%202%20in%2024%20%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://www.designisphilosophy.com/microsoft-expression-web/previewing-silverlight-applications-in-your-browser-with-expression-development-server-20080803/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.designisphilosophy.com/microsoft-expression-web/previewing-silverlight-applications-in-your-browser-with-expression-development-server-20080803/&amp;title=Previewing+Silverlight+Applications+in+Your+Browser+With+Expression+Development+Server" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://www.designisphilosophy.com/microsoft-expression-web/previewing-silverlight-applications-in-your-browser-with-expression-development-server-20080803/&amp;title=Previewing+Silverlight+Applications+in+Your+Browser+With+Expression+Development+Server" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.designisphilosophy.com/microsoft-expression-web/previewing-silverlight-applications-in-your-browser-with-expression-development-server-20080803/&amp;title=Previewing+Silverlight+Applications+in+Your+Browser+With+Expression+Development+Server" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.designisphilosophy.com/microsoft-expression-web/previewing-silverlight-applications-in-your-browser-with-expression-development-server-20080803/&amp;title=Previewing+Silverlight+Applications+in+Your+Browser+With+Expression+Development+Server" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-newsvine">
			<a href="http://www.newsvine.com/_tools/seed&amp;save?u=http://www.designisphilosophy.com/microsoft-expression-web/previewing-silverlight-applications-in-your-browser-with-expression-development-server-20080803/&amp;h=Previewing+Silverlight+Applications+in+Your+Browser+With+Expression+Development+Server" rel="nofollow" class="external" title="Seed this on Newsvine">Seed this on Newsvine</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->



<p>Related posts:<ol><li><a href='http://www.designisphilosophy.com/microsoft-expression/posting-a-silverlight-application-major-headache-20070806/' rel='bookmark' title='Permanent Link: Posting a Silverlight Application &#8211; Major Headache'>Posting a Silverlight Application &#8211; Major Headache</a></li>
<li><a href='http://www.designisphilosophy.com/microsoft-expression/silverlight-posting-test-20070808/' rel='bookmark' title='Permanent Link: Silverlight Posting Issues &#8211; Solved'>Silverlight Posting Issues &#8211; Solved</a></li>
<li><a href='http://www.designisphilosophy.com/silverlight/silverlight-in-opera-20080312/' rel='bookmark' title='Permanent Link: Silverlight in Opera (but no Silverligth 2 &#8211; at least not yet)'>Silverlight in Opera (but no Silverligth 2 &#8211; at least not yet)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.designisphilosophy.com/microsoft-expression-web/previewing-silverlight-applications-in-your-browser-with-expression-development-server-20080803/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
