<?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>Mesmer Lab &#187; css</title>
	<atom:link href="http://www.mesmerlab.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mesmerlab.com</link>
	<description>Tech and trends in web design+development.</description>
	<lastBuildDate>Tue, 22 Jun 2010 00:59:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wordpress Plugin: WP-Table Reloaded</title>
		<link>http://www.mesmerlab.com/wordpress-table-reloaded/</link>
		<comments>http://www.mesmerlab.com/wordpress-table-reloaded/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 19:51:46 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://www.mesmerlab.com/?p=697</guid>
		<description><![CDATA[So I wanted to have a table with zebra stripes in a Wordpress installation. I found a quick and full-featured plugin that allows the stripes, plus so much more.
WP-Table Reloaded will let you import a table from a CSV, HTML or XML file. You can enter the cell data directly into the admin page. You [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/"><img src="http://www.mesmerlab.com/wp-content/uploads/2009/10/wp-table-reloaded.jpg" alt="WP-Table Reloaded - Wordpress Plugin" title="WP-Table Reloaded - Wordpress Plugin" width="275" height="206" class="alignright size-full wp-image-700 postimage" /></a>So I wanted to have a table with zebra stripes in a Wordpress installation. I found a quick and full-featured plugin that allows the stripes, plus so much more.</p>
<p><a href="http://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/">WP-Table Reloaded</a> will let you import a table from a CSV, HTML or XML file. You can enter the cell data directly into the admin page. You can swap column or row order with minimal effort. You can hide or show columns or rows.<span id="more-697"></span></p>
<h3>Extra Features</h3>
<p>But then there are extra features that really make this plugin shine. </p>
<ul>
<li>Alternating row colors:  	 Every second row will have an alternating background color.</li>
<li>Use Table Headline: 	The first row of your table will use the &lt;th&gt; tag.</li>
<li>Print Table Name: 	The Table Name will be written above the table in a &lt;h2&gt; tag.</li>
<li>Print Table Description: 	The Table Description will be written under the table.</li>
<li>Use Tablesorter: 	You may sort a table using the Tablesorter-jQuery-Plugin.</li>
</ul>
<p>I&#8217;m currently using this plugin on a website for a <a href="http://greenedgesprinklers.com/pricing/">sprinkler company in Houston, Texas</a>. Everything you see on the page is pretty much stock settings. There is one table for the service fees, since I didn&#8217;t want zebra stripes on a 2-row table. Then another table for the rest of the services.</p>
<p>I just wanted to give a quick nod to this well-rounded and very functional Wordpress plugin for implementing HTML tables. Thanks go to the author of this plugin. (Apparently this is his first WP plugin!)<!-- pingbacker_start --><br />
<h4>Related Blogs</h4>
<ul class='pc_pingback'>
<li><a href='http://www.boygeniusreport.com/2010/03/03/virgin-america-selects-html-over-flash-re-ignites-the-flash-vs-html-debate/'>Virgin America selects <b>HTML</b> over Flash, re-ignites the Flash vs <b>&#8230;</b></a></li>
<li><a href='http://coffeeonthekeyboard.com/bleach-html-sanitizer-and-auto-linker-for-django-344/'>Bleach, <b>HTML</b> sanitizer and auto-linker | Coffee on the Keyboard</a></li>
<li><a href='http://smallbiztrends.com/2010/03/google-more-local-more-social.html'>Google Goes More Local, Social With Results <b>Page</b> | Small Business <b>&#8230;</b></a></li>
<li><a href='http://webworkerdaily.com/2010/03/01/create-an-faq-page-for-colleagues-and-clients/'>Create an FAQ <b>Page</b> For Colleagues and Clients – WebWorkerDaily</a></li>
<li><a href='http://www.mobilemarketingwatch.com/nbc-mobile-olympics-takes-gold-with-87-million-page-views-5609/'>NBC Mobile Olympics Takes Gold With 87M <b>Page</b> Views : Mobile <b>&#8230;</b></a></li>
<li><a href='http://www.seoconsult.co.uk/SEOBlog/offpage-optimisation/set-up-your-off-page-seo-with-a-bang.html'>Set Up Your Off-<b>Page</b> SEO With a Bang | SEO Consult &#8211; Certified <b>&#8230;</b></a></li>
<li><a href='http://www.graphicstech.com/index.php/tampa-bay-internet-marketing-effective-landing-page-strategy/'>Why an Effective Landing <b>Page</b> is Needed to Complete Your Internet <b>&#8230;</b></a></li>
<li><a href='http://splashpage.mtv.com/2010/03/02/former-x-men-first-class-writer-josh-schwartz-explains-his-exit/'>Former &#39;X-Men: First Class&#39; Writer Josh Schwartz Explains His Exit</a></li>
<li><a href='http://benjamin.smedbergs.us/blog/2010-03-03/firefox-safe-from-plugin-crashes/'>Answers and Questions » Blog Archive » Firefox, Safe From <b>Plugin</b> <b>&#8230;</b></a></li>
<li><a href='http://www.catonmat.net/blog/vim-plugins-ragtag-allml-vim/'>Vim <b>Plugins</b> You Should Know About, Part VII: ragtag.vim (formerly <b>&#8230;</b></a></li>
<li><a href='http://www.1stwebdesigner.com/wordpress/basic-wordpress-plugins-every-blog/'>7 Must Have WordPress <b>Plugins</b> For Every Blog | Graphic and Web <b>&#8230;</b></a></li>
<li><a href='http://wordpress.tv/2009/11/13/john-hawkins-building-plugin-phx09/'>John Hawkins: Building a WordPress <b>Plugin</b> « WordPress.tv</a></li>
<li><a href='http://www.seodenver.com/mad-mimi/'>Mad Mimi <b>Plugin</b> for WordPress | Denver SEO Blog</a></li>
<li><a href='http://johnhaydon.com/2010/03/embed-seo-automation-wordpress-blog-posts/'>WordPress SEO Simplified With Scribe <b>Plugin</b></a></li>
<li><a href='http://thomas.apestaart.org/log/?p=1159'>thomas.apestaart.org » N900 Facebook <b>plugin</b> problems</a></li>
<li><a href='http://wordcast.bitwiremedia.com/2010/03/03/plugin-picks-2-google-analyticator/'><b>Plugin</b> Picks 2: Google Analyticator | WordCast &#8211; BBlogging news <b>&#8230;</b></a></li>
<li><a href='http://lifestreamblog.com/custom-php-lifestream-script-built-atop-wordpress-plugin/'>Custom PHP Lifestream Script Built Atop Wordpress <b>Plugin</b> <b>&#8230;</b></a></li>
<li><a href='http://www.rapidownloads.net/games/battlefield-bad-company-2-reloaded-28/'>Battlefield.Bad.Company.2-<b>RELOADED</b></a></li>
<li><a href='http://gadget-reviews.org/longhorn-reloaded-logon-for-vista/'>Gadget Reviews: longhorn <b>reloaded</b> logon for vista | Gadget Reviews -</a></li>
<li><a href='http://mafiaweb.org/2010/03/alone-in-the-dark-reloaded/'>Alone In The Dark <b>RELOADED</b></a></li>
</ul>
<p><!-- pingbacker_end --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mesmerlab.com/wordpress-table-reloaded/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Here&#8217;s a Quick Way to Add a Custom Date Graphic to your WordPress Blog</title>
		<link>http://www.mesmerlab.com/heres-a-quick-way-to-add-a-custom-date-graphic-to-your-wordpress-blog/</link>
		<comments>http://www.mesmerlab.com/heres-a-quick-way-to-add-a-custom-date-graphic-to-your-wordpress-blog/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 23:28:38 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.mesmerlab.com/?p=396</guid>
		<description><![CDATA[You may have noticed the spiffy new calendar icon here at Mesmer Lab. Well I created the graphic purely in Photoshop and have made it available at Graphic River. A future article will explain how I made it, but this article is about how to implement it into your WordPress blog. 
The goal is to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.mesmerlab.com/wp-content/uploads/2009/03/max-calendar.jpg" alt="Use this calendar image on your custom WordPress blog." title="Use this calendar image on your custom WordPress blog." width="154" height="150" class="alignright size-full wp-image-399 postimage" />You may have noticed the spiffy new calendar icon here at Mesmer Lab. Well I created the graphic purely in Photoshop and have made it available at Graphic River. A future article will explain how I made it, but this article is about how to implement it into your WordPress blog. </p>
<p>The goal is to get rid of the generic-looking display of each article&#8217;s date. The visitor to most sites would want to know when the article is written to see how relevant the ideas, data or techniques are. A bold display of the date lets the user quickly scan and find the publish date.<span id="more-396"></span></p>
<h3>Step One: The Image</h3>
<p>For quickness, you can download the png file I&#8217;m using here, download the <a href="http://graphicriver.net/item/calendar-icon/32314?ref=Serengeti">full source file at Graphic River</a>, or build your own. Just make note of the dimensions since we&#8217;ll be using it as a background image.</p>
<p>You can use most anything as a date icon.  Common metaphors include a calendar like I&#8217;m using or the piece of paper that <a href="http://www.webdesignerwall.com/">Web Designer Wall</a> uses.</p>
<h3>Step Two: The WordPress Code</h3>
<p>We have to create a few new elements to house the date code. This will take the place of the stock date implementation so we can put or own spin on the look and feel. The following is how I&#8217;ve done it here at Mesmer Lab. I&#8217;ve modified the code in the Main Index Template (index.php).</p>
<blockquote><pre><code>&lt;?php if(have_posts()) : while(have_posts()) : the_post(); ?&gt;

<span style="color:red;">&lt;div class="post"&gt;

&lt;p class="date"&gt;
     &lt;?php the_time('M'); ?&gt;
     &lt;span>&lt;?php the_time('d'); ?&gt;&lt;/span&gt;
&lt;/p&gt;</span>

{your post code goes here}

<span style="color:red;">&lt;/div&gt;</span>

&lt;?php endwhile ?&gt;
</code></pre>
</blockquote>
<p>I&#8217;ve created a DIV with the &#8216;post&#8217; class inside the loop. There&#8217;s a tiny bit of CSS applied to this div and I&#8217;ll explain it in a few minutes. </p>
<p>I&#8217;ve used a paragraph element for the main container. The paragraph seemed to work better than a typical DIV, in regards to ease of modification and cross-browser compatibility. This is where I put the month for the article.</p>
<p>The span element works perfectly inside the paragraph tag, simply because I added the &#8216;display:block&#8217; designation. It seemed to play along better instead of a DIV. The numerical date (with leading zero) resides here.</p>
<h3>Step Three: The WordPress CSS</h3>
<blockquote><pre><code>.post {
position:relative;
}</code></pre>
</blockquote>
<p>The wrapping DIV is set to position relatively. This allows absolute positioning inside for the paragraph element. If you don&#8217;t do this, all the dates on the home page will be on top of each other. Don&#8217;t just copy and paste this code into your theme files. If you&#8217;re not using my specific image, your results will not look right.</p>
<blockquote><pre><code>.date {
background:transparent url(<span style="color:red;">'your-image.png'</span>);
position:absolute;
left:-80px;
top:8px;
color:#fff;
width:56px;
height:61px;
padding:14px 0 0 18px;
font:bold 12px Arial;
}</code></pre>
</blockquote>
<p>Next you&#8217;ll need to link the image to the paragraph and position it absolutely inside the div.post element. The padding and width/height are tied together in the box model. You&#8217;ll have to adjust the width and height depending on how much padding you need for the text to show up properly. Typical font styling is present.</p>
<blockquote><pre><code>.date span {
display:block;
width:100%;
text-align:center;
margin-left:-7px;
margin-top:1px;
line-height:26px;
color:#000;
font: italic bold 24px Georgia,"Times New Roman",Times,serif;
}</code></pre>
</blockquote>
<p>To push the numerical date on a second line, I&#8217;ve employed &#8216;display:block&#8217;. Span by nature displays its contents inline. The margin code is for simple positioning. The line-height is so IE will display the whole number. And we round it out with typical font styling.</p>
<h3>Step Four: Adding to Single Posts</h3>
<p>The next step is relatively easy. Open the Single Post (single.php) file and repeat the code you used in Step Two. This goes in the same place, so it should be easy for you to find.</p>
<h3>Conclusion</h3>
<p>Customization will make your Wordpress site unique. You can add a sense of branding by efficient use of colors, icons or other visual elements. By adding a custom date graphic to your Wordpress site, you are on your way to standing out in the crowd. </p>
<p>I hope you enjoyed this tutorial. Comments, suggestions and how you&#8217;ve implemented this on your site are welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mesmerlab.com/heres-a-quick-way-to-add-a-custom-date-graphic-to-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Create a Menu Tree with CSS</title>
		<link>http://www.mesmerlab.com/create-a-graphic-menu-tree-with-css/</link>
		<comments>http://www.mesmerlab.com/create-a-graphic-menu-tree-with-css/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 00:30:34 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[unordered list]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.mesmerlab.com/?p=232</guid>
		<description><![CDATA[In this article I&#8217;ll show you how to get rid of the stock disc that is on the typical unordered list &#60;UL&#62;. This solution will work no matter how many characters are in your list item &#60;LI&#62;. 
You&#8217;ll create two images, throw a little CSS code in the mix, and end up with a very [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.mesmerlab.com/wp-content/uploads/2009/02/feature-image.png" alt="Create a Visual Submenu Tree with Pure CSS" title="Create a Visual Submenu Tree with Pure CSS" width="203" height="226" class="alignright size-full wp-image-314 postimage" />In this article I&#8217;ll show you how to get rid of the stock disc that is on the typical unordered list &lt;UL&gt;. This solution will work no matter how many characters are in your list item &lt;LI&gt;. </p>
<p>You&#8217;ll create two images, throw a little CSS code in the mix, and end up with a very flexible system that will grow with almost anything you throw at it. You can use the already present colors to help your lists tie in with the design. I&#8217;ve used this on a project and the client really liked how it turned out. So continue reading and I&#8217;ll guide you step by step on how to add this customization to your toolbelt. Your clients will love you for it.<span id="more-232"></span></p>
<p><a href="http://www.mesmerlab.com/demo/ul-tree.html" target="_blank">View the demo</a>.</p>
<h3>Step One: Create Two Images</h3>
<p><img src="http://www.mesmerlab.com/wp-content/uploads/2009/02/ul-many-closeup.png" alt="LI background image, long" title="LI background image, long" width="96" height="187" class="alignright size-full wp-image-303 postimage" />Open up your image editor of choice and create a new file 16px wide by 100px tall, or however tall you think a single list item will be in your situation. </p>
<p><img src="http://www.mesmerlab.com/wp-content/uploads/2009/02/ul-end-closeup.png" alt="LI background image, end" title="LI background image, end" width="96" height="90" class="alignright size-full wp-image-304 postimageleft" />You can get a little creative with it, but I drew a simple 1px line. Setting the background transparent will keep your images future-proof if you ever want to change the background color of the site. </p>
<p>So you will end up with two images, one relatively tall with the horizontal bar at the top and another relatively square with the horizontal part ending where it meets the vertical.</p>
<h3>Step Two: Write the CSS Code</h3>
<p>Now open up your code editor of choice. I&#8217;ve used Dreamweaver forever, but I&#8217;m starting to use Notepad++ more often.</p>
<h5>Clear All Inherent Styling</h5>
<p>The first part of the CSS code is extremely important because Internet Explorer still has the majority of the browser share. It is good practice to have a reset file like <a href="http://meyerweb.com/eric/tools/css/reset/index.html">this one</a>. If you&#8217;re not going to use a reset.css file, you must clear the layout of your list.</p>
<blockquote><pre><code>ul {margin:0;padding:0;}</code></pre>
</blockquote>
<h5>Create The Menu Container</h5>
<p>This is optional, in case you already have a home for your menu. But all subsequent code assumes that the &#8217;submenu&#8217; class is applied to your list&#8217;s parent.</p>
<blockquote><pre><code>.submenu {
	width: 200px;
	border: 1px solid #555;
	font: normal bold 12px Verdana, Arial, sans-serif;
	padding:10px;
	color: #3877C4;
	}</code></pre>
</blockquote>
<h5>UL Code</h5>
<p><img src="http://www.mesmerlab.com/wp-content/uploads/2009/02/ul-code.png" alt="Top and bottom padding for spacing, left padding to offset from header text." title="Top and bottom padding for spacing, left padding to offset from header text." width="200" height="185" class="alignright size-full wp-image-346 postimage" />This code will format the unordered list. Add a little top and bottom padding for spacing. The left padding offsets the list from the header text.</p>
<blockquote style="float:left;width:320px;"><pre><code>.submenu ul {
	padding:10px 0 10px 20px;
	}</code></pre>
</blockquote>
<h5>LI Code</h5>
<p><img src="http://www.mesmerlab.com/wp-content/uploads/2009/02/li-code.png" alt="Puts in some breathing room in case there are multiple lines. Gets rid of the stock icon. Adds some bottom padding for spacing." title="Puts in some breathing room in case there are multiple lines. Gets rid of the stock icon. Adds some bottom padding for spacing." width="180" height="157" class="alignright size-full wp-image-350 postimage" />The first line puts in a little breathing room if/when your text expands into multiple lines. Setting the &#8216;list-style-type&#8217; to none gets rid of the stock icon. To end up, we apply a little bottom padding for visual goodness.</p>
<blockquote style="float:left;width:340px;"><pre><code>.submenu li {
	line-height:15px;
	list-style-type:none;
	padding:0 0 8px 0;
	}</code></pre>
</blockquote>
<h5>Second Tier UL Code</h5>
<p><img src="http://www.mesmerlab.com/wp-content/uploads/2009/02/2ndul-code.png" alt="Top padding to push down from the LI parent. Left padding to indent." title="Top padding to push down from the LI parent. Left padding to indent." width="180" height="107" class="alignright size-full wp-image-354 postimage" />We are now into the second level of the menu. A little top padding pushes this UL down from its LI parent. The left padding indents the UL and can be modified to your taste.</p>
<blockquote style="float:left;width:340px;"><pre><code>.submenu li ul {
	padding: 5px 0 0 18px;
	}</code></pre>
</blockquote>
<h5>Second Tier LI Code</h5>
<p><img src="http://www.mesmerlab.com/wp-content/uploads/2009/02/2ndli-code1.png" alt="Left padding to push text off of the image." title="Left padding to push text off of the image." width="179" height="54" class="alignright size-full wp-image-358 postimage" />Now we&#8217;re into the good stuff. Most of your second tier list items will use this piece of code. Make sure you use the correct path to your image file. This is the tall graphic I had you create earlier. Of course we don&#8217;t want it to repeat. And the left padding pushes your LI text over so we can see your shiny new image.</p>
<blockquote style="float:left;width:563px;"><pre><code>.submenu li ul li {
	background-image:url(ul-long.gif);
	background-repeat:no-repeat;
	padding-left:18px;
	}</code></pre>
</blockquote>
<h5>Second Tier LI Code &#8211; Last LI</h5>
<p><img src="http://www.mesmerlab.com/wp-content/uploads/2009/02/2ndli-code-end.png" alt="Zero padding. The 18px from .submenu li ul takes care of this. We&#039;re also swapping the background image." title="Zero padding. The 18px from .submenu li ul takes care of this. We&#039;re also swapping the background image." width="162" height="15" class="alignright size-full wp-image-361 postimage" />So up until this point we have only used a single class, the one applied to the container. To be compatible with all browsers we must employ a class to put the endcap on the list. Now we use the smaller graphic of course. We reset the bottom padding to zero because the second tier UL code does this already.</p>
<blockquote style="float:left;width:563px;"><pre><code>.submenu li ul li.end {
	background-image:url(ul-end.gif);
	padding-bottom:0;
	}</code></pre>
</blockquote>
<h5>Second Tier LI Code &#8211; :last-child</h5>
<p><img src="http://www.mesmerlab.com/wp-content/uploads/2009/02/last-child.png" alt="Internet Explorer doesn&#039;t recognize the :last-child pseudo-class." title="Internet Explorer doesn&#039;t recognize the :last-child pseudo-class." width="176" height="206" class="alignright size-full wp-image-362 postimage" /><span style="color:red;">This code is not suggested for deployment. This is only for demonstration purposes.</span></p>
<p>So as you might know, Internet Explorer likes to employ its own dialect of CSS. One piece of very useful code that is missing in all IE flavors is the :last-child pseudo class. To be fair, :first-child works fine. When not in demonstration mode with three different menus you&#8217;ll want to use the code below. To facilitate the demo of :last-child alongside two other menus I have dropped a &#8216;lastchild&#8217; class on the second tier UL on the demo page, third box.</p>
<p>Open the page in Firefox, Chrome and Safari. You&#8217;ll see no difference in the far right menu. Open in IE and you&#8217;ll get the standard LI code with the tall graphic on the last LI. Maybe they&#8217;ll add it in IE 8.1?</p>
<blockquote><pre><code>.submenu li ul li:last-child {
	background-image:url(ul-end.gif);
	padding-bottom:0;
	}</code></pre>
</blockquote>
<div class="clear"></div>
<p><a href="http://www.mesmerlab.com/demo/ul-tree.html" target="_blank">View the demo</a>.</p>
<h3>Final Thoughts</h3>
<p>Try out some of these ideas to spruce up my simple design.</p>
<ul>
<li>Arrow on the right side of the images</li>
<li>Curve the vertical line into the horizontal line</li>
<li>Use an animated gif to make your list more dynamic</li>
<li>Use a single sprite instead of two images.</li>
</ul>
<p>If you&#8217;re going to use alpha transparency in your image, you&#8217;ll want to save as a PNG-24. Doing this will skew your colors slightly in Internet Explorer. This is because of the gamma correction saved in the image. Every browser except IE disregards the gamma value. I&#8217;ll show you how to correct this in an upcoming article.</p>
<p>Let me know how you liked this tutorial. Any comments and suggestions are welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mesmerlab.com/create-a-graphic-menu-tree-with-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Add Custom Fonts to your WordPress Site</title>
		<link>http://www.mesmerlab.com/add-custom-fonts-to-your-wordpress-site/</link>
		<comments>http://www.mesmerlab.com/add-custom-fonts-to-your-wordpress-site/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 23:57:31 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.mesmerlab.com/?p=247</guid>
		<description><![CDATA[In the old days if you wanted to have a non-standard font on your site that was viewable by your visitors, you would need to provide a download link so they could add the custom font onto their computer. This was a little clunky, but it allowed a better user experience and would help mesh [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.mesmerlab.com/wp-content/uploads/2009/01/main-image.png" alt="main-image" title="main-image" width="282" height="182" class="alignright size-full wp-image-262" style="float:right;margin:0 0 20px 20px;border:1px solid #333;padding:10px;" />In the old days if you wanted to have a non-standard font on your site that was viewable by your visitors, you would need to provide a download link so they could add the custom font onto their computer. This was a little clunky, but it allowed a better user experience and would help mesh your design together. One can only handle so much Verdana and Arial each day.</p>
<p>Fast-forward about 10 years. There have been great strides in font technology on the web.<span id="more-247"></span> The first well-known solution was <a href="http://en.wikipedia.org/wiki/Scalable_Inman_Flash_Replacement">sIFR</a>, a Flash-based solution that converted your text into a .swf file which is viewable by most modern browsers. Adding a custom font became a little easier. However, the coding required made these sites a little sluggish and needed javascript and Flash to be enabled.</p>
<p>Of course most of the good stuff on the web these days requires javascript, but that still meant sIFR needed Flash. An alternative that uses pure code and no proprietary filetypes came along, called <a href="http://facelift.mawhorter.net/">FLIR</a>. Now this solution lets your site break free of the Flash requirement. It does however require PHP to be installed on your web host. This isn&#8217;t a huge obstacle since most commercial host companies offer PHP scripting.</p>
<p>Now to the good stuff concerning WordPress users. The guys over at HostScope.com have developed a <a href="http://www.hostscope.com/wordpress-plugins/ttftitles-wordpress-plugin/">plugin that achieves FLIR goodness</a> in an easy admin interface. I use this plugin to carry over the custom font in my logo to the sidebar headings on the right.</p>
<h3>Step 1: Installation</h3>
<p><a href="http://wordpress.org/extend/plugins/ttftitles/">Download</a>, install and activate TTFTitles.</p>
<h3>Step 2: Uploading Fonts</h3>
<p>Navigate to the Appearance section of your WordPress admin. You&#8217;ll find the TTF Titles section under this heading. Go to the Fonts link and upload your custom font. </p>
<h3>Step 3: Creating Styles</h3>
<p><img src="http://www.mesmerlab.com/wp-content/uploads/2009/01/styles-300x195.png" alt="styles" title="styles" width="300" height="195" class="alignright size-medium wp-image-264" style="float:right;margin:0 0 20px 20px;border:1px solid #333;padding:10px;" />Navigate to the Styles section of the TTF Titles admin. You can adjust how your custom font will be viewed from here. I have a specific style for my sidebar and one for the &#8216;Leave a Comment&#8217; element that is in the content section. I believe the plugin uses PNG-8 because you must designate a background color. The green background of the sidebar style did not look appealing on the white of the content section. I&#8217;d love for the author to update the plugin to use PNG-24, allowing for a style to be used anywhere.</p>
<h3>Step 4: The Code</h3>
<p>Applying the styles to your site is relatively easy, even for those who don&#8217;t know PHP. For instance, in the second sidebar on the right, the title code used to be&#8230;</p>
<blockquote><pre><code>&lt;h3&gt;Recent Articles&lt;/h3&gt;</code></pre>
</blockquote>
<p>To render the title with my font I simply wrap the text with a little PHP like this&#8230;</p>
<blockquote><pre><code>&lt;h3&gt;<span style="color:red;"><strong>&lt;?php the_ttftext("</strong></span>Recent Articles<span style="color:red;"><strong>"); ?&gt;</strong></span>&lt;/h3&gt;</code></pre>
</blockquote>
<p>Use the following code when adding the functionality to a WordPress variable.</p>
<blockquote><pre><code>&lt;?php get_bloginfo('name'); ?&gt;
... turns into ...
 &lt;?php <span style="color:red;"><strong>the_ttftext(</strong></span>get_bloginfo('name')<span style="color:red;"><strong>)</strong></span>; ?&gt;</code></pre>
</blockquote>
<p>The previous implementations assume you&#8217;re using the style set as default. To use a different style like I have for my comment section you would code as follows.</p>
<blockquote><pre><code>&lt;?php the_ttftext("Leave a Comment"<span style="color:red;"><strong>, true, "Opus on white", ""</strong></span>); ?&gt;</code></pre>
</blockquote>
<p>This pulls in the name of your custom style in the third parameter. The last parameter is for alterations to the style, similar to inline styles in CSS. I can designate a different color, font size, or any other available attributes.</p>
<p>So now you can have more control over the user experience by adding custom fonts. Let me know how you&#8217;ve implemented this on your site.<!-- pingbacker_start --><br />
<h4>Related Blogs</h4>
<ul class='pc_pingback'></ul>
<p><!-- pingbacker_end --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mesmerlab.com/add-custom-fonts-to-your-wordpress-site/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
		<item>
		<title>FireScope: The SitePoint Reference Tool for Firebug</title>
		<link>http://www.mesmerlab.com/firescope-the-sitepoint-reference-tool-for-firebug/</link>
		<comments>http://www.mesmerlab.com/firescope-the-sitepoint-reference-tool-for-firebug/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 11:44:57 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Web Tech]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[sitepoint]]></category>

		<guid isPermaLink="false">http://www.mesmerlab.com/?p=235</guid>
		<description><![CDATA[SitePoint has released FireScope, a browser plugin for Firefox that puts an HTML and CSS reference only a click away.
After installation, just do the typical &#8216;inspect element&#8217; action and you&#8217;ll see the new &#8216;Reference&#8217; tab. Click the tab and you&#8217;ll see information about the element you chose plus any attributes that are defined for that [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tools.sitepoint.com/firescope/" target="_blank"><img alt="" src="http://tools.sitepoint.com/firescope/images/firescope-logo.jpg" title="Firescope logo" class="alignnone" width="300" height="100" style="float:right;margin:0 0 20px 20px;border:1px solid #333;padding:10px;" /></a><a href="http://www.sitepoint.com/">SitePoint</a> has released <a href="http://tools.sitepoint.com/firescope/" target="_blank">FireScope</a>, a browser plugin for Firefox that puts an HTML and CSS reference only a click away.</p>
<p>After installation, just do the typical &#8216;inspect element&#8217; action and you&#8217;ll see the new &#8216;Reference&#8217; tab. Click the tab and you&#8217;ll see information about the element you chose plus any attributes that are defined for that element. You&#8217;ll see information about the element, what browsers support it, and a &#8216;more&#8217; link to the <a href="http://reference.sitepoint.com/" target="_blank">reference section</a> on SitePoint&#8217;s website.</p>
<p>I have always respected SitePoint for being a leader in almost everything related to web development. They have published books on a wide variety of internet technologies and continually push out new content. I&#8217;m sure this new plugin will help spread their knowledge to more web developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mesmerlab.com/firescope-the-sitepoint-reference-tool-for-firebug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
