<?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>Kieran Chapman Design &#187; CSS</title>
	<atom:link href="http://kieranchapmandesign.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://kieranchapmandesign.com</link>
	<description>Web and user experience design by Kieran Chapman</description>
	<lastBuildDate>Fri, 21 Oct 2011 02:44:14 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Display Your Logo with CSS</title>
		<link>http://kieranchapmandesign.com/2009/10/display-your-logo-with-css/</link>
		<comments>http://kieranchapmandesign.com/2009/10/display-your-logo-with-css/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 14:42:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://kieranchapmandesign.com/?p=261</guid>
		<description><![CDATA[A simple CSS tip to display your logo and keep your code clean and SEO-friendly]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a simple tip to use CSS for displaying your website&#8217;s logo (and any image in general). The HTML is about as basic as you can get:</p>
<div class="code">
&lt;h1&gt;&lt;a href=&#8221;/&#8221;&gt;My Great Website&lt;/a&lt;&gt;/h1&gt;
</div>
<p>The CSS to &#8220;hide&#8221; the text and display the logo image instead is pretty simple as well:</p>
<div class="code">
h1 {<br />
	width: 400px;<br />
	height: 100px;<br />
	background: url(/images/logo.gif) top left no-repeat;<br />
}</p>
<p>h1 a {<br />
	text-indent: -300em;<br />
	overflow: hidden;<br />
	float: left;<br />
	width: 400px;<br />
	height: 100px;<br />
}
</p></div>
<p>This styles the text and sets the height and width of the <tt>h1</tt> tag to the size of the logo, and displays the logo as a background image. The <tt>h1&nbsp;a</tt> style hides the text from the user (but not from search engines) by negative indenting the text and basically hiding it off-screen.</p>
<p>The result:</p>
<ul>
<li>very simple HTML code that&#8217;s easily read by search engines (better for SEO)</li>
<li>text that provides a correct representation of the logo (no ALT tag needed)
<li>design elements are kept separate from the code, making future updates easier (the image can be changed simply by modifying the CSS)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://kieranchapmandesign.com/2009/10/display-your-logo-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

