<?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>nasarik.com - one man&#039;s journey through life and design &#187; image</title>
	<atom:link href="http://nasarik.com/tag/image/feed/" rel="self" type="application/rss+xml" />
	<link>http://nasarik.com</link>
	<description>A web designer try&#039;s to make sense of web design and pretty much everything else</description>
	<lastBuildDate>Sun, 25 Jul 2010 20:18:07 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
  <link>http://nasarik.com</link>
  <url>http://nasarik.com/wp-content/themes/sandbox/images/nasarikfav.jpg</url>
  <title>nasarik.com - one man&#039;s journey through life and design</title>
</image>
		<item>
		<title>CSS sprites &#8211; What they are, and how to use them?</title>
		<link>http://nasarik.com/2009/05/css-sprites-what-they-are-and-how-to-use-them/</link>
		<comments>http://nasarik.com/2009/05/css-sprites-what-they-are-and-how-to-use-them/#comments</comments>
		<pubDate>Fri, 15 May 2009 21:51:06 +0000</pubDate>
		<dc:creator>nasarik</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[buttons]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[rollover]]></category>
		<category><![CDATA[sprites]]></category>
		<category><![CDATA[state]]></category>

		<guid isPermaLink="false">http://nasarik.com/?p=249</guid>
		<description><![CDATA[
This is short article to briefly explain what sprites are and how you can implement them into you CSS designs.

CSS sprites are the combination of many images into one large image, each individual image is then moved using background position to be visible within each container; this process is extremely usefull in navigation menus where [...]]]></description>
			<content:encoded><![CDATA[<p><img class="post_images" src="http://farm4.static.flickr.com/3579/3529577524_59d6bccff7.jpg?v=0" alt="" width="445" height="120" /></p>
<p>This is short article to briefly explain what sprites are and how you can implement them into you CSS designs.</p>
<p><span id="more-249"></span></p>
<p>CSS sprites are the combination of many images into one large image, each individual image is then moved using background position to be visible within each container; this process is extremely usefull in navigation menus where you would want two or three button image states <em>(This method also nicely replaces the need for unnecessary javascript libraries)</em>.</p>
<p>What you will gain from using CSS sprites is better performance from you site as it needs to make less HTTP image requests which will ease the load on your pages.</p>
<h3>A simple example:</h3>
<p>Firstly, create an image 250px wide and 100px deep, within the image area create two button states with slightly different styles so that each state will be clear to the user <em>(As in the example below)</em>.  Save the image as a JPEG ready to use in the CSS.</p>
<p><img style="padding-top: 20px;" src="http://farm3.static.flickr.com/2292/3528525861_623237c29b.jpg?v=0" alt="" width="250" height="100" /></p>
<h3>The CSS:</h3>
<p>Then place the following CSS into the head of your document;  this will create the display area for the sprite while the background position will display the first button state.</p>
<p><strong>ul.menu { list-style:none; padding:0; margin:0; }</strong></p>
<p><strong>ul.menu li a { list-style:none; display:block; width: 250px; height:50px; background:url(btn_eg.jpg) no-repeat; background-position: 0 0; }</strong></p>
<p>Next we need to add the hover state, this will simply move the image up withing the same container when the mouse is over the button.  To include the hover state simply add the following CSS after the main menu code.</p>
<p><strong>ul.menu li a:hover { background-position: 0 -50px; }</strong></p>
<h3>The HTML:</h3>
<p>Finally reference your button in the body as you would normally with the following HTML:</p>
<p><strong>&lt;ul class=&#8221;menu&#8221;&gt;<br />
&lt;li&gt;&lt;a href=&#8221;http://nasarik.com&#8221;&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</strong></p>
<p>To see the final example <a href="http://nasarik.com/wp-content/examples/csssprite/menu_eg.html" target="_blank">click here</a></p>
<h3>Overview</h3>
<p>And you are done, a simple an effective way to start using CSS sprites in your pages<strong>. </strong>I have added two links to more in-depth articles on the subject of sprites below enjoy.<br />
<a href="http://nasarik.com/wp-content/examples/csssprite/menu_eg.html" target="_blank"></a></p>
<p><a href="http://css-tricks.com/css-sprites/" target="_self">CSS Sprites: What They Are, Why They’re Cool, and How To Use Them</a><br />
<a href="http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/" target="_blank">The Mystery Of CSS Sprites: Techniques, Tools And Tutorials</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nasarik.com/2009/05/css-sprites-what-they-are-and-how-to-use-them/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replacing text headers with images using CSS</title>
		<link>http://nasarik.com/2009/01/replacing-text-headers-with-images-using-css/</link>
		<comments>http://nasarik.com/2009/01/replacing-text-headers-with-images-using-css/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 22:23:38 +0000</pubDate>
		<dc:creator>nasarik</dc:creator>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[engine]]></category>
		<category><![CDATA[h1]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[span]]></category>

		<guid isPermaLink="false">http://nasarik.com/?p=27</guid>
		<description><![CDATA[
The lack of fonts available to web designers is a constant source of frustration.  Don&#8217;t panic though, just over the horizon is CSS font embedding, until then here is a simple solution to help keep your pages looking good while still keeping those search engine&#8217;s happy.

Firstly here is the CSS, I will explain in more detail later.
h1 [...]]]></description>
			<content:encoded><![CDATA[<p><img class="post_images" src="http://farm4.static.flickr.com/3259/3232499192_195ab88b15.jpg?v=0" alt="" width="445" height="120" /></p>
<p>The lack of fonts available to web designers is a constant source of frustration.  Don&#8217;t panic though, just over the horizon is CSS font embedding, until then here is a simple solution to help keep your pages looking good while still keeping those search engine&#8217;s happy.</p>
<p><span id="more-27"></span></p>
<p>Firstly here is the CSS, I will explain in more detail later.</p>
<p>h1 {font: 18px  Arial, Helvetica, sans-serif; width:200px, height:100px; background: url(nasariklogo.jpg);}<br />
h1 span {display:none;}</p>
<p>And here is the HTML.</p>
<p>&lt;h1&gt;&lt;span&gt;nasarik.com tutorials life technology&lt;/span&gt;&lt;/h1&gt;</p>
<p>So here are the details, the h1 contains the background image that is to be displayed as well as the text style, the h1 span is requesting that nothing should display.  So all you need to do is reference your h1 in the body with your text inside, then to hide the text add the span, easy really.  There are variations on this theme, for instance instead of using display:none; you can use absolute positioning to move the text off the displaying document.</p>
<p>This would look like-</p>
<p>h1 span {position:absolute; left:-2000px;}</p>
<p>Both give the same effect, but I prefer the first option as it simplifies your code just that little bit.  There are however a number of alternatives which are covered on <a href="http://www.webdesignerwall.com/general/fonts-and-the-web/">Web Designer Wall.</a>  I am now waiting for CSS and web browsers to catch up so that we can start embedding our fonts.</p>
]]></content:encoded>
			<wfw:commentRss>http://nasarik.com/2009/01/replacing-text-headers-with-images-using-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
