<?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>Codepal &#187; CSS</title>
	<atom:link href="http://www.code-pal.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.code-pal.com</link>
	<description>We develop enthralling web experiences.</description>
	<lastBuildDate>Tue, 03 Jan 2012 19:43:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>The &#8216;Select&#8217; Problem After Using jqTransform and its Solution</title>
		<link>http://www.code-pal.com/the-select-problem-after-using-jqtransform-and-its-solution/</link>
		<comments>http://www.code-pal.com/the-select-problem-after-using-jqtransform-and-its-solution/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 17:33:08 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[jqTransform]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=411</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2010/02/jqtransform-thumbnail-150x150.png" class="attachment-thumbnail wp-post-image" alt="The &#039;Select&#039; Problem After Using jqTransform and its Solution" title="The &#039;Select&#039; Problem After Using jqTransform and its Solution" /></p>Recently, I was working on a project which required a customized form with only select boxes. I used jqTransform to customize the form and while working on it I discovered that after transforming the select box into a list of hyperlinks, the 'change' method of the select box doesn't work at all. As 'on-value-change' event is a very important function for any drop down list box so here is a very simple solution to manipulate it while using jqTransform.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2010/02/jqtransform-thumbnail-150x150.png" class="attachment-thumbnail wp-post-image" alt="The &#039;Select&#039; Problem After Using jqTransform and its Solution" title="The &#039;Select&#039; Problem After Using jqTransform and its Solution" /></p><h3>The Project</h3>
<p>In this recent project of mine, I was required to construct a landing page. In this landing page, there would be a list of languages and after the user selects any particular language, the homepage of the site would open automatically in the respective selected language. It was also required to style the select list box in the way it was given in the design of the landing page. So I opted for the <a href="http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/" target="_blank">jqTransform</a> jQuery plug-in, which I used once to style some forms. <a href="http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/" target="_blank">jqTransform</a> is very nice plug-in to customize the forms in a very easy way and the end product is no doubt beautiful. But in this case, it became a minor speed breaker to my progress.</p>
<h3>The Problem</h3>
<p>The drop down list control of the html form contains the &#8216;select&#8217; tags which enclose the various &#8216;option&#8217; tags. Here is a form which I am using in this tutorial to explain the problem:</p>
<pre class="brush: xml; title: ;">
&lt;form&gt;
	&lt;h4&gt;Select Box Without jqTransform&lt;/h4&gt;
	&lt;div id=&quot;box-city&quot; class=&quot;select-menus&quot;&gt;
		&lt;label&gt;City&lt;/label&gt;
		&lt;br/&gt;
		&lt;select name=&quot;select-country&quot;&gt;
  		        &lt;option&gt;Gotham&lt;/option&gt;
			&lt;option&gt;New York City&lt;/option&gt;
			&lt;option&gt;Smallville&lt;/option&gt;
		&lt;/select&gt;
		&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
	&lt;/div&gt;
&lt;/form&gt;
</pre>
<p>What jqTransform does is, it scans the whole &#8216;select&#8217; tag and creates an unordered list containing hyper-links of the options in the drop-down-list. It then hides the original &#8216;select&#8217; tag and its content.</p>
<pre class="brush: xml; title: ;">
&lt;form class=&quot;jqtransform jqtransformdone&quot;&gt;
	&lt;h4&gt;Select box with jqTransform and normal select change method&lt;/h4&gt;
	&lt;div class=&quot;select-menus&quot; id=&quot;box-name&quot;&gt;
		&lt;label style=&quot;cursor: pointer;&quot;&gt;Name&lt;/label&gt;
		&lt;div class=&quot;jqTransformSelectWrapper&quot; style=&quot;z-index: 10; width: 150px;&quot;&gt;
			&lt;div&gt;
				&lt;span style=&quot;width: 119px;&quot;&gt;Batman&lt;/span&gt;
				&lt;a class=&quot;jqTransformSelectOpen&quot; href=&quot;#&quot;&gt;&lt;/a&gt;
			&lt;/div&gt;
                        &lt;ul style=&quot;width: 148px; display: none; visibility: visible; height: 100px; overflow: hidden;&quot;&gt;
				&lt;li&gt;&lt;a index=&quot;0&quot; href=&quot;#&quot; class=&quot;selected&quot;&gt;Batman&lt;/a&gt;&lt;/li&gt;
				&lt;li&gt;&lt;a index=&quot;1&quot; href=&quot;#&quot;&gt;Robin&lt;/a&gt;&lt;/li&gt;
				&lt;li&gt;&lt;a index=&quot;2&quot; href=&quot;#&quot;&gt;Superman&lt;/a&gt;&lt;/li&gt;
				&lt;li&gt;&lt;a index=&quot;3&quot; href=&quot;#&quot;&gt;Spiderman&lt;/a&gt;&lt;/li&gt;
			&lt;/ul&gt;
			&lt;select name=&quot;select-country&quot; class=&quot;jqTransformHidden&quot; style=&quot;&quot;&gt;
	 				&lt;option&gt;Batman&lt;/option&gt;
					&lt;option&gt;Robin&lt;/option&gt;
					&lt;option&gt;Superman&lt;/option&gt;
					&lt;option&gt;Spiderman&lt;/option&gt;
			&lt;/select&gt;
		&lt;/div&gt;
		&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
	&lt;/div&gt;
&lt;/form&gt;
</pre>
<p>This does not create a problem when we use the &#8216;select&#8217; tag generally for selecting a particular value and then performing the form submission by using a submit button. It creates a problem when we want to perform some function when the value of the drop down list is changed. </p>
<p>This is normally achieved in javascript by using the &#8216;change&#8217; method of the select control. The &#8216;change&#8217; method captures the value-change event and we can access the value selected by the user in the following manner.</p>
<pre class="brush: jscript; title: ;">
// Capturing the change event of the Non-Transformed Select Box.
$(&quot;#box-city select&quot;).change(function(){
	var value= $(this).val();
    alert(&quot;Value Selected = &quot;+value);
});
</pre>
<p>But after using the <a href="http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/" target="_blank">jqTransform</a> plugin, the &#8216;select&#8217; tag is no more there to apply the change method on. </p>
<h3>The Solution</h3>
<p>The solution to this, is a very simple one. We can simulate the change event for the jqTransformed drop down list by applying a click function to the hyper-link element within the unordered list. Then we can have the selected value by accessing the text of the span tag where the selected element is set or displayed.</p>
<pre class="brush: jscript; title: ;">
// Capturing the change event of the Transformed Select Box using the modified method of capturing the value change event.
$(&quot;#box-age div.jqTransformSelectWrapper ul li a&quot;).click(function(){
	var value= $(&quot;#box-age div.jqTransformSelectWrapper span&quot;).text()
	alert(&quot;Value Selected = &quot;+value);
	return false; //prevent default browser action
});
</pre>
<h3>Conclusion</h3>
<p>This is one way of simulating the change function for drop-down-list boxes after using jqTransform to customize them. The other option is to modify the jqTransform plugin itself to properly access the onChange event of the &#8216;Select&#8217; boxes. I hope the jqTransform plug-in developers can fix this problem in their next release of the plug-in. Though this is not a very important or common bug but I do hope that this was of some help. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/the-select-problem-after-using-jqtransform-and-its-solution/feed/</wfw:commentRss>
		<slash:comments>73</slash:comments>
		</item>
		<item>
		<title>Proactive Solutions UK</title>
		<link>http://www.code-pal.com/proactive-solutions-uk/</link>
		<comments>http://www.code-pal.com/proactive-solutions-uk/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 19:20:44 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PSD to xHTML/CSS]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=389</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2009/12/proactive-solution-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="proactive-solution" title="proactive-solution" /></p>Proactive Solutions is a single page business card type website which we coded for <a href="http://www.buckdesign.co.uk" target="_blank">BuckDesign Studios</a>.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2009/12/proactive-solution-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="proactive-solution" title="proactive-solution" /></p><p><a href="http://www.buckdesign.co.uk" target="_blank"> Buck Design Ltd.</a> wanted a single page website developed for their new client, Proactive Solutions. This single page website would act as an online business card which would just contain the contact details about the company.</p>
<h4>The Challenge</h4>
<p>Overall the project was a simple single paged static site but the design team had a particular specification about the design. They wanted the blue abstract box in the design to be exactly at a certain distance from the logo when the page loads and they wanted it to touch the right edge of the browser at all time.</p>
<h4>The Solution</h4>
<p>The design of the webpage was made for a particular resolution. But web pages can be viewed in a variety of screen resolutions. Now if the screen resolution of the computer was higher than the one designed for, then obviously the abstract blue box would move away from the logo as it needed to be attached to the right edge of the browser.</p>
<p>After discussing it with the design team, we came to the conclusion that the first impression of the site should be such that, the box is at that much distance from the logo as it was in the design. The only possible way to achieve this was to reset the browser window to a size which would bring the blue abstract box closer to the logo. This fulfilled their first demand of the blue abstract box being near the logo when the user first opens the site. If the user increases the web browser’s size, the blue abstract box is always attached to the right edge of the browser which satisfies their second demand.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/proactive-solutions-uk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>O&#8217; Brien and Carr Website</title>
		<link>http://www.code-pal.com/o-brien-and-carr-website/</link>
		<comments>http://www.code-pal.com/o-brien-and-carr-website/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 23:43:19 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PSD to xHTML/CSS]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=88</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2009/09/obrian-and-carr-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="O&#039; Brian and Carr Website" title="obrian-and-carr" /></p>O' Brien and Carr website is a clean professional brochure website which also consists of a PHP based gallery.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2009/09/obrian-and-carr-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="O&#039; Brian and Carr Website" title="obrian-and-carr" /></p><p>O&#8217; Brien and Carr website is a clean professional brochure website which also consists of a PHP based gallery. <a href="http://www.buckdesign.co.uk" target="_blank">BuckDesign Studios</a> wanted their design to be transformed into a fully working website which would load pretty fast and would be user friendly when it came to uploading images in the gallery. We achieved the target with loads of time to spare and a very satisfied client.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/o-brien-and-carr-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spice Up Your Twitter Feed Display Box Using CSS</title>
		<link>http://www.code-pal.com/spice-up-your-twitter-feed-box-using-css/</link>
		<comments>http://www.code-pal.com/spice-up-your-twitter-feed-box-using-css/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 20:48:10 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[display feed]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[sprite]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=348</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2009/10/spice-up-your-twitter-feed-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Spice Up Your Twitter Feed Display Box Using CSS" title="Spice Up Your Twitter Feed Display Box Using CSS" /></p>Everyone has a twitter account nowadays and all like to showcase their most recent tweets on their websites. This is generally done by displaying the tweets enclosed in a visually appealing box or the twitter bird shouting it. Here is a small tutorial on how you can increase the interactivity further with the help of CSS.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2009/10/spice-up-your-twitter-feed-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Spice Up Your Twitter Feed Display Box Using CSS" title="Spice Up Your Twitter Feed Display Box Using CSS" /></p><p>For a very long time now there has been this trend of displaying tweets on the website’s sidebar, footer or the header. Many designers have designed ingenious ways of displaying the tweets by creating beautiful eye-catching illustrations containing them. The main purpose of making them visually attractive is so that the visitors can get interested and read the fresh updates that the site’s owner is providing. What this tutorial is going to do is enable to you to make your twitter feed display box interactive so that your visitors can go &#8216;wow! That’s pretty cool&#8217; when they visit your site or read your feeds. So here it goes:</p>
<h3>Step 1. How do I insert the feed in my website?</h3>
<p>Inserting your twitter account&#8217;s feed in your website may become tricky. It&#8217;s a good thing there are so many tutorials out there which provide you with the knowledge of inserting these feeds easily. Here are some resources which will enable you to get the feeds from twitter onto your very own site:</p>
<p>1.<a href="http://css-tricks.com/video-screencasts/19-designing-a-unique-page-for-twitter-updates/">Designing a Unique Page for Twitter Updates</a><br />
2.<a href="http://net.tutsplus.com/articles/10-awesome-ways-to-integrate-twitter-with-your-website/">10 Awesome Ways to Integrate Twitter With Your Website</a><br />
3.<a href="http://tweet.seaofclouds.com/">Tweet!</a></p>
<p>WordPress users can use some awesome plugins to get their twitter feed on their site:</p>
<p>1.<a href="http://technews.am/conversations/nettuts-link-feed/35_awesome_twitter_plugins_for_wordpress">35 Awesome Twitter Plugins for WordPress</a><br />
2.<a href="http://juitter.com/">Juitter</a><br />
3.<a href="http://coda.co.za/blog/2008/10/26/jquery-plugin-for-twitter">jQuery Plugin For Twitter</a></p>
<h3>Step 2. Creating the image sprite.</h3>
<p>Now that you have successfully learned how to import the twitter feed, it&#8217;s time to configure the display area. For this tutorial, I am going to use the same design for the twitter box as I have used in this site&#8217;s footer i.e. a twitter bird staring at the tweets.</p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/normal.jpg" alt="Normal Twitter Feed Box " title="normal" width="415" height="150" class="size-full wp-image-355" /></div>
<p> What our primary aim is that when ever the user hover&#8217;s over the twitter feed box, some action is going to take place. In our case the twitter bird will look towards the user. </p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/on-hover.jpg" alt="Twitter Feed Box On Hover" title="on-hover" width="415" height="150" class="size-full wp-image-344" /></div>
<p>You can create designs like this using various twitter icons made by some wonderful designers who love to share their work with the web community. Here is an ultimate source to these icons.</p>
<p><a href="http://www.hongkiat.com/blog/100-remarkably-beautiful-twitter-icons-and-buttons/">100+ Remarkably Beautiful Twitter Icons And Buttons</a> (Always remember to ask the designer first before using these icons.)<br />
<a href="http://www.productivedreams.com/its-twitter-time-free-vector-icon-set/">Free vector icon set by ProductiveDreams.com</a></p>
<p>I have used the icons made by ProductiveDreams. After creating a simple box in photoshop. Place the normal twitter bird icon i.e. the one with the cross sectional view of the bird, at the bottom right side of the box such that the bird appears to be looking inside the box. Now paste the other twitter bird icon, the one which appears to be looking towards the viewer. </p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/push-over-normal.jpg" alt="Slowly push the image over the normal icon" title="push-over-normal" width="415" height="150" class="size-full wp-image-345" /></div>
<p>Then push the tilted bird icon above the older icon which you placed at the bottom right corner of the box such that it appears like a two headed twitter bird as shown below</p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/after-push-over.jpg" alt="After the icon is pushed over the previously placed icon" title="after-push-over" width="415" height="150" class="size-full wp-image-339" /></div>
<p>Now hide the tilted twitter bird icon and properly mark a square containing the normal twitter bird using guide lines. Make sure that both the tilted and the normal bird fit properly in the same square made by the guidelines. </p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/mark-guides.jpg" alt="Guides marked to contain the twitter bird" title="mark-guides" width="500" height="199" class="size-full wp-image-360" /></div>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/mark-guides-tilted.jpg" alt="Guides marked to contain the twitter bird tilted" title="mark-guides-tilted" width="500" height="199" class="size-full wp-image-361" /></div>
<p>Crop the image with the normal twitter bird icon along the guidelines and open a new file and paste it there. Then check the height of the cropped image and increase the canvas size by that amount vertically. This is done so that you can paste the tilted twitter bird version on the same canvas to give the final touches to the image sprite. </p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/height.jpg" alt="height of the cropped image" title="height" width="550" height="373" class="size-full wp-image-341" /></div>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/canvas-size.jpg" alt="increasing the canvas size" title="canvas-size" width="593" height="394" class="size-full wp-image-340" /></div>
<p>Hide the normal twitter bird icon and make the other tilted bird visible. Then crop the image again along the guide lines just as you did for the previous image. Copy the image and paste it on the newly created canvas where you pasted the other image. Adjust the images so that they properly fit the whole canvas. Your image sprite is ready for use and should look like this:</p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/the-css-sprite.jpg" alt="the final css sprite after completion" title="the-css-sprite" width="208" height="402" class="size-full wp-image-347" /></div>
<h3>Step 3. Coding the bird to life!</h3>
<p>The html skeleton of the twitter feed box is going to be a simple one. There would be a main container div containing the twitter feed, the bird and an optional &#8220;Follow Me&#8221; link. </p>
<pre class="brush: xml; title: ;">
&amp;amp;lt;div id=&amp;amp;quot;twitter&amp;amp;quot;&amp;amp;gt;
	&amp;amp;lt;a href=&amp;amp;quot;http://twitter.com/SumeetChawla&amp;amp;quot; id=&amp;amp;quot;twitter-link&amp;amp;quot;&amp;amp;gt;Follow Me!&amp;amp;lt;/a&amp;amp;gt;
	&amp;amp;lt;div id=&amp;amp;quot;twitter-bird&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;/div&amp;amp;gt;
	&amp;amp;lt;!--Your Twitter Feed Comes Here--&amp;amp;gt;
&amp;amp;lt;/div&amp;amp;gt;
</pre>
<p>The CSS for the &#8216;#twitter&#8217; container div is very simple. The &#8216;#twitter-bird&#8217; div is going to contain the bird. It should have half the height of the original sprite we made because only one of the two images in the sprite will be displayed. Using CSS sprites is a good practice because it reduces server requests, hence decreases the load time and prevents the sudden flashes of the image when hovered upon for the first time. </p>
<p>The twitter bird div should be floated to the right and a negative margin should be assigned to it so that the bird appears to be some what outside the container div. Make the background position &#8216;top&#8217; so that the normal twitter bird is displayed. To give the finishing touches to our twitter feed box, just change the background image position of the &#8216;twitter-bird&#8217; div to &#8216;bottom&#8217; when ever the user hovers over the container div.</p>
<pre class="brush: css; title: ;">
#twitter {
	color: #658097;
	position: relative;
	width: 332px;
	height: 122px;
	background-color: #1f1f1f;
	border: 1px solid #414040;
	background-position: left bottom;
	background-repeat: no-repeat;
	padding-left: 10px;
	padding-top: 10px;
}
#twitter-bird{
	background-image: url('images/twitter.jpg');
	background-position:top;
	position: relative;
	float: right;
	margin-top: 32px;
	margin-right: -75px;
	width: 101px;
	height: 100px;
	background-repeat: no-repeat;
}
#twitter:hover #twitter-bird {
	background-position: bottom;
}
</pre>
<p>To see how the final result would look like, just scroll down to the footer at the bottom of this page.</p>
<h3>Examples</h3>
<p>Gopal Raju from <a href="http://www.productivedreams.com">ProductiveDreams</a> has made his twitter feed look very lively and bright. The twitter bird is interactive in a very friendly and casual way. It winks and displays the total number of followers that he has. </p>
<p><strong>Before Hovering</strong>:</p>
<div class="post-image"><a href="http://www.productivedreams.com"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/pd-before-hover.jpg" alt="Productive Dreams Before Hover" title="pd-before-hover" width="406" height="175" class="size-full wp-image-367" /></a></div>
<p><strong>After Hover</strong>:</p>
<div class="post-image"><a href="http://www.productivedreams.com"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/pd-on-hover.jpg" alt="Productive Dreams After Hover" title="pd-on-hover" width="407" height="200" class="size-full wp-image-368" /></a></div>
<p>This was the only site I could find which made the twitter feed box interactive. If you guys find any other site which follows this trend just post about it in the comment and I will make sure to add it here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/spice-up-your-twitter-feed-box-using-css/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>How to Code an Overlapping Tabbed Main Menu</title>
		<link>http://www.code-pal.com/how-to-code-an-overlapping-tabbed-main-menu/</link>
		<comments>http://www.code-pal.com/how-to-code-an-overlapping-tabbed-main-menu/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 07:39:36 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[over lapped]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=293</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2009/10/code-overlapping-tabs-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="How to Code an Overlapping Tabbed Main Menu" title="How to Code an Overlapping Tabbed Main Menu" /></p>Main navigation menu is that part of a website design that makes the whole site look lively and complete. But the most common type of navigation menu style still being used a lot is the tabbed navigation menu. Here is a tutorial on how to code an overlapping tabbed menu.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2009/10/code-overlapping-tabs-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="How to Code an Overlapping Tabbed Main Menu" title="How to Code an Overlapping Tabbed Main Menu" /></p><p> There are various styles and techniques of creating a tabbed navigation menu and one of them is the tabbed overlaying or overlapped style in which each tab appears to be lying over the other and hence giving the whole menu a very realistic feel.  While designing my site, I went through lots of inspirations and tutorials. One of them was this tutorial called <a href="http://psd.tutsplus.com/tutorials/interface-tutorials/photoshop-paper-texture-from-scratch-then-create-a-grungy-web-design-with-it/">Photoshop Paper Texture from Scratch then Create a Grungy Web Design with it!</a>  Written by Collis from <a href="http://www.nettuts.com">NetTuts.com</a> This ended up being the main inspiration for my site and while going through the tutorial I found Collis saying that: </p>
<p><strong>&#8221; Now if I do say so myself these tabs look awesome, and the reason they do is because they overlap. Unfortunately this also makes them harder to work with in HTML. You can however do a variety of things with transparent PNGs, or alternately just make text change colours in rollovers and not worry about changing tab colours. Anyhow this is all a bit beyond the scope of this tutorial. Suffice to say the menu might be a bit tricky to build. &#8220;</strong></p>
<p>So I tried coding one into html and after I succeeding thought of sharing it with you all. </p>
<h3>Step 1.Gearing Up</h3>
<p>So before starting to code this kind of a tabbed navigation into html/css code, you first have to learn how to create one in photoshop first. The above tutorial is very detailed and Collis does a great job in teaching how to build such a menu in photoshop. I have built one simple one specially for this tutorial. </p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/menu-image.jpg" alt="menu-image" title="menu-image" width="550" height="265" class="alignnone size-full wp-image-321" /></div>
<p>Now let me specify that there are three states of the tab.The inactive state is grayish in colour, the active state is deep blue and the hover state is light steel blue colour. Hence, rather than slicing up three images for each tab, we can slice out an image sprite.</p>
<h3>Step 2. Slicing The Tabs From the PSD</h3>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/tab-sprite.jpg" alt="tab-sprite" title="tab-sprite" width="550" height="484" class="alignnone size-full wp-image-309" /></div>
<p>Align the tabs vertically using grids as shown in the image above. You can also align the tabs horizontally rather than vertically but then the CSS background image position will be accessed in a different way. The choice depends on person to person but both work perfectly. While cropping the image follow the guidelines properly and note that I have made the background transparent because we will be needing a transparent background if we need to overlap the tabs. Crop the image and save it for web in PNG24 format. One more point to note while slicing up the images is that the first tab i.e. the &#8216;Home&#8217; tab should not be having any shadow on its left edge in the inactive state. Hence, for that specific tab we have to create another sprite without the shadows in it.</p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/no-shadow-sprite.jpg" alt="no-shadow-sprite" title="no-shadow-sprite" width="550" height="498" class="alignnone size-full wp-image-311" /></div>
<h3>Step 3. Code Away</h3>
<p>Now that our slicing is complete and we have all the images needed we can start coding our navigation bar. Just to make the example look good, I have constructed a sample featured content area layout with the overlapped navigation bar. The whole layout looks like this:</p>
<pre class="brush: xml; title: ;">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;

&lt;head&gt;
&lt;meta content=&quot;text/html; charset=utf-8&quot; http-equiv=&quot;Content-Type&quot; /&gt;
&lt;link href=&quot;css/styles.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
&lt;/head&gt;

&lt;body&gt;
	&lt;div id=&quot;page-wrap&quot;&gt;
		&lt;ul id=&quot;main-nav&quot;&gt;
			&lt;li class=&quot;current&quot;&gt;&lt;a href=&quot;index.html&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;portfolio&quot;&gt;&lt;a href=&quot;portfolio.html&quot;&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;services&quot;&gt;&lt;a href=&quot;services.html&quot;&gt;Services&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;about&quot;&gt;&lt;a href=&quot;about.html&quot;&gt;About Us&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;contact&quot;&gt;&lt;a href=&quot;contact.html&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
		&lt;div id=&quot;featured&quot;&gt;
			&lt;div id=&quot;featured-content&quot;&gt;
			&lt;/div&gt;
		&lt;/div&gt;
	&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</pre>
<p>Lets look at our main navigation menu. I have used a simple unordered list as any other navigation bar and styled it using a background image to the list&#8217;s hyperlink tag. </p>
<pre class="brush: xml; title: ;">
&lt;ul id=&quot;main-nav&quot;&gt;
	&lt;li class=&quot;current&quot;&gt;&lt;a href=&quot;index.html&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
	&lt;li class=&quot;portfolio&quot;&gt;&lt;a href=&quot;portfolio.html&quot;&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
	&lt;li class=&quot;services&quot;&gt;&lt;a href=&quot;services.html&quot;&gt;Services&lt;/a&gt;&lt;/li&gt;
	&lt;li class=&quot;about&quot;&gt;&lt;a href=&quot;about.html&quot;&gt;About Us&lt;/a&gt;&lt;/li&gt;
	&lt;li class=&quot;contact&quot;&gt;&lt;a href=&quot;contact.html&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<pre class="brush: css; title: ;">
ul#main-nav li {
	float: left;
	position: relative;
	display: inline;
}
</pre>
<p>Remember that we are using an image sprite for the tabs in which the top most tab represents the active state, the middle represents the inactive state and the bottom represents the hover state. Hence, we will use the &#8216;background-position&#8217; property to properly place the images to their respective state as follows:</p>
<pre class="brush: css; title: ;">
ul#main-nav li a {
	position: relative;
	width: 110px;
	height: 29px;
	display: block;
	background-image: url('../images/tabs.png');
	background-position: center center;
	color: #44403b;
	text-decoration: none;
	font-size: 14px;
	padding-top: 12px;
	text-align: left;
	padding-left: 30px;
	font-weight: bold;
}
ul#main-nav li.home a {
	background-image: url('../images/tab-home.png');
}
ul#main-nav li.current a {
	background-position: top;
	color: #ffffff;
}
ul#main-nav li a:hover {
	background-position: bottom;
	color: #ffffff;
}
ul#main-nav li.current a:hover {
	background-position: top; /*To Prevent the Current tab from changing colour on hover*/
	color: #ffffff;
}
</pre>
<p>You will notice that I have given a relevant class to each of the list elements and a class named &#8216;current&#8217; to the tab which is for the current page. This is done so that I can assign different z-index values to each tab in an ascending order such that each tab lies at a higher z-axis than the tab following it. The tab with the class &#8216;current&#8217; will lie at the highest order of the z-axis because it represents the current page and will always stay on top irrespective of it&#8217;s position in the list. Before applying the z-index values, make sure that the position attribute for the list element is set to relative. Without any positioning value the z-index property won&#8217;t work at all.</p>
<pre class="brush: css; title: ;">
ul#main-nav li.current {
	z-index: 100;
}
ul#main-nav li.home {
	z-index: 100;
}
ul#main-nav li.portfolio {
	z-index: 99;
}
ul#main-nav li.services {
	z-index: 98;
}
ul#main-nav li.about {
	z-index: 97;
}
ul#main-nav li.contact {
	z-index: 96;
}
</pre>
<p>Even though we have assigned different z-index values to the tabs, they still don&#8217;t appear over lapped and will look like this:</p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2009/10/non-overlapped-tabs.jpg" alt="non-overlapped-tabs" title="non-overlapped-tabs" width="550" height="60" class="alignnone size-full wp-image-324" /></div>
<p>To give the finishing touches to our navigation bar, we have to push each tab on top of the other. We have assigned the z-index values in descending order from left to the right. Hence, we will just push each tab starting from the right to about 20px to its left by adding a negative &#8216;margin-left&#8217; property to the &#8216;ul#main-nav li&#8217; and push the whole navigation bar unordered list to the left by adding a positive 20px &#8216;margin-left&#8217; to nullify the left wards movement of the bar.</p>
<pre class="brush: css; title: ;">
ul#main-nav {
	margin-left: 20px;
}
ul#main-nav li {
	float: left;
	position: relative;
	margin-left: -20px;
	display: inline;
}
</pre>
<h3>Mission Accomplished</h3>
<p>After assembling all the css and the xhtml together, we will have our overlapped tabbed main navigation menu ready for use. This was my take on how to create this kind of a menu and am sure there are many better ways to do the same. I would be glad if you could share any other way of doing this or just discuss some improvements to this procedure itself.<br />
Here are some site which use over lapping tabs as their main navigation menu:<br />
<a href="http://www.ilove2design.at/">ILove2Design.at</a><br />
<a href="http://www.hiddendepth.ie/">HiddenDepth.ie</a><br />
<a href="http://www.hotcards.com/business-cards">HotCards.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/how-to-code-an-overlapping-tabbed-main-menu/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>Orange</title>
		<link>http://www.code-pal.com/orange/</link>
		<comments>http://www.code-pal.com/orange/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 13:20:59 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[PSD]]></category>
		<category><![CDATA[Template]]></category>
		<category><![CDATA[xHTML]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=273</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2009/10/orange-illustration-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Orange Free xHTML/CSS Template" title="Orange Free xHTML/CSS Template" /></p>Orange is a neat and clean business template designed by <a href="http://www.psdtemplate.com/free-psd-templates/company-psd-template.html" target="_blank">PSDTemplate.com</a> for small companies.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2009/10/orange-illustration-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Orange Free xHTML/CSS Template" title="Orange Free xHTML/CSS Template" /></p><p><a href="http://www.psdtemplate.com" target="_blank">PSDTemplate.com</a> is a great site providing some really cool website templates created in photoshop. They have a section of premium PSD layouts where they release a layout every day. They also have a free PSD layout section where they release good quality layouts available free of cost. They released Orange as one of the free PSD templates and we have coded it so that people who want to have the xHTML/CSS version of this awesome template can have that too!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/orange/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Summer of Love</title>
		<link>http://www.code-pal.com/summer-of-love/</link>
		<comments>http://www.code-pal.com/summer-of-love/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 14:34:55 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[PSD]]></category>
		<category><![CDATA[Template]]></category>
		<category><![CDATA[xHTML]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=170</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2009/09/summer-of-love-post-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Summer of Love Free xHTML/CSS Template" title="Summer of Love Free xHTML/CSS Template" /></p>Summer of love is a beautiful template designed by <a href="http://www.bevelandemboss.net/show-template.php?id=6" target="_blank">BevelAndEmboss.net</a>. This theme can be used for a music event or even for a band.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2009/09/summer-of-love-post-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Summer of Love Free xHTML/CSS Template" title="Summer of Love Free xHTML/CSS Template" /></p><p><a href="http://www.slodive.com" target="_blank">SloDive</a> recently posted an article named <a href="http://slodive.com/photoshop/40-free-psd-website-templates/#comment-16092042" target="_blank">40 Free PSD Website Templates</a>. This is an excellent resource for designers who don’t want to start from scratch with their designing process or for developers who are not very good at designing.  This xHTML/CSS template that we have coded for you guys can easily be integrated with any content management system. It is purely table-less and semantically correct for SEO purposes. Go ahead, download it and start your own band or organize a music event! <img src='http://www.code-pal.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/summer-of-love/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Business Template</title>
		<link>http://www.code-pal.com/business-template/</link>
		<comments>http://www.code-pal.com/business-template/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 23:31:40 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[PSD]]></category>
		<category><![CDATA[Template]]></category>
		<category><![CDATA[xHTML]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=84</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2009/09/business-template-thumbnail-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Business Themed Free xHTML/CSS Template" title="Business Themed Free xHTML/CSS Template" /></p>Business template is a free PSD Template designed by <a href="http://www.dellustrations.com/" target="_blank">Dellustrations</a>, available for download at <a href="http://dellustrations.com/blog/2009/01/30/free-website-psd-template/comment-page-1/#comment-51" target="_blank">DelliBlog</a> and we did it's xHTML/CSS.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2009/09/business-template-thumbnail-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Business Themed Free xHTML/CSS Template" title="Business Themed Free xHTML/CSS Template" /></p><p>Business template is a free PSD Template designed by <a href="http://www.dellustrations.com/" target="_blank">Dellustrations</a> and is available for download at <a href="http://dellustrations.com/blog/2009/01/30/free-website-psd-template/comment-page-1/#comment-51" target="_blank">DelliBlog</a>. We transformed this PSD template into valid xHTML/CSS code for people who want to download the code along with the PSD template.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/business-template/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/


Served from: www.code-pal.com @ 2012-02-04 18:31:59 -->
